Tag: dev

Running Chrome in headless mode with Selenium C#

In this post we are going to discuss about running Chrome in headless mode with Selenium C#

Chrome headless

Headless Chrome is a way to run Chrome browser without the actual browser UI being spawned. Essentially its running Chrome without chrome! It brings all modern web platform features provided by Chromium and the Blink rendering engine to the command line and automation testing tool such as Selenium in our case

Where is it useful ?

  • A headless browser is a great tool for automated testing and server environments where you don’t need a visible UI shell.
  • And again its not a completely new technology, since there are other big players in this area such as
    • PhantomJS
    • HTMLUnitDriver

So when is Chrome Headless available ?

  • Chrome Headless is supported from Chrome 59.x and above.
  • The current stable version for Windows 10 is Chrome 60.x
  • ChromeDriver v2.30 and above supports headless mode

What changes should I make in my Existing Selenium test ?

Here is the complete video of the above discussion Read more

Working with Functions, Anonymous and Arrow functions in Typescript

In our last post we discussed how to work with Variable, Enums and Arrays in Typescript. In this post we will discuss working with different types of functions

Functions

Functions are the fundamental building block of any applications in JavaScript. They’re how you build up layers of abstraction, mimicking classes, information hiding, and modules. In TypeScript, while there are classes, namespaces, and modules, functions still play the key role in describing how to do things. TypeScript also adds some new capabilities to the standard JavaScript functions to make them easier to work with

Function Parameters

  1. Parameter with types
  2. Rest parameters
  3. Default parameters

Parameters with Types

This function looks something like this

Rest Parameters

Default Parameters

Anonymous Functions

Functions which don’t have Name/identifiers are considered as Anonymous functions. These functions are dynamic and called during runtime

Arrow Functions

Read more

Working with Variables, Enums and Arrays with Typescript

In our last post we discussed an introduction and installation of Typescript, in this post we will discuss how to work with Variables, Enums and Arrays with Typescript.

Working with Variables

There are different types available in Typescript which are almost available in JS like

  1. Number
  2. String
  3. Boolean
  4. Any
  5. void
  6. Null

Variable Declaration

Declarations of variable can be done with following in Typescript

  1. let
  2. const
  3. var

Working with Arrays and Enums

Enums allow us to define a set of named numeric constants. An enum can be defined using the enum keyword.

Arrays

Inserting an value in to an array can be done something like this

Here is the complete source code of the above discussion in GitHub

Read more

Writing custom configuration for Selenium automation framework

In this post, I am going to discuss about one of the important extension added in my Udemy course Automation framework development with Selenium C# (Advanced) which is custom configuration for selenium automation framework

Problem Statement

Currently in our EAFramework discussed in the course we are using GlobalConfig.xml file to read information for our framework as one shown below

Well, the problem with the above configuration is, while working with EAFramework in remote machines to deploy the code via

  • Jenkins
  • TFS or
  • Running in remote machines on Azure

Read more

Introduction to Selenium grid with Docker

In our last few posts, we discussed how to working with docker, containers and working with multiple containers. In this post we will discuss how to work with Selenium grid using Docker.

What is Selenium grid?

SeleniumGrid allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. Essentially, SeleniumGrid support distributed test execution.

Selenium grid architecture with Docker

Getting things ready for selenium test

We need to have following installed in our machine before starting selenium grid test

  • 1. Docker for Windows
  • 2. Pulled the latest Selenium hub container
  • 3. Pulled the latest Selenium node for firefox/chrome
  • 4. Visual Studio 2015 (any edition)

Here is the complete video of the above discussion

Introduction

Initiating docker selenium grid container setup 

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK

Working with methods in C#

In the last post we discussed how to work with different types in C#, in this post we will discuss how to

  • Work with methods
  • Methods with different parameters (method overloading)
  • Methods with return types

Here is the complete videos of the above topics

Methods with return types

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK

PicklesUI an easy option to generate Specflow documentation

In the last post we discussed how to generate Specflow scenario documentation using Pickles with Visual studio package manager console via command line interface.

In this post we will discuss how to generate Specflow documentation using PicklesUI, which has an easy to use GUI as opposed to command

picklesUI

Here is the complete video of the above discussion

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK