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

Running C# code on Raspberry Pi 3 with .Net core 2.0

In our last video in YouTube channel of ExecuteAutomation we discussed how to install Windows 10 IoT on RaspberryPi 3 and access it via Powershell and device portal, in this post we will discuss how to run an simple C# console application on RaspberryPi 3 with .Net Core 2.0 framework.

Getting stage ready for .Net core 2.0 app

Before we start writing console application, first we need to have following pre-requisite environment setup

  1. Installing .Net Core 2.0 SDK in Windows 10 host machine, which you can see from here
  2. Should have at least VS code or VS 2017 community edition (to edit C# code)

Coding

Here is the simple code written to execute on RaspberryPi 3 running Windows 10 IoT

After Coding

Connect with Raspberry Pi 3 via power shell and enable FTP service to transfer file from host machine to Raspberry Pi 3

Running code on Raspberry Pi from Powershell

Read more

Rally for Rivers – Save India’s Lifelines

I know this post has nothing to do with automation nor does it help anyone who have anything to do with India, but India is in its brink of water scarcity and its getting worse every year.

I am from southern part of India and my native is Madurai and last month while I traveled to India for holiday, I got completely distressed with the way people are living their day to day life, the underground water in most of the areas are completely depleted and most of the people that too living in the heart of city are waiting for drinking water supply from corporation. The bad news is, the water supply happening from corporation is now extended from 3 days once to weekly once and even worse there is NO water in Vaigai river which is the only source of drinking water for people in and around Madurai.

The above statement is applicable for year 2017, but if we dont save water or merge all the rivers now (which is the only hope we got, since we have cut almost all the trees and made complete deforestation) the statement will be something like this

People in Madurai forgot what ground water is and madurai corporation is planning to supply drinking water monthly once.

Sadhguru, in fact my Guru is conducting an great rally named “Rally for Rivers” which is mainly done by Sadhguru with only one motivation, SAVE THE NATION AND HUMANITY.

I support the effort of Sadhguru, hats off Guru ji

Lets all support for the great moment which is going to happen on September 2017

Thanks,

Karthik KK

Working with Interfaces in Typescript

In our last article, we discussed how to work with Enums, functions and anonymous functions. In this article, we will discuss about Interfaces in Typescript.

Interface

One of TypeScript’s core principles is that type-checking focuses on the shape that values have. This is sometimes called “duck typing” or “structural subtyping”. In TypeScript, interfaces fill the role of naming these types, and are a powerful way of defining contracts within your code as well as contracts with code outside of your project.

Type interference to actual types

Now our existing function we discussed in previous post will become from this

Read more

Selenium is now supported in .Net Core 2.0 Preview 2 with Visual Studio 2017 15.3

In this article we will talk about running Selenium test with .Net core 2.0 Preview 2 using Visual Studio 2017 15.3

I am very happy and excited to write this article, since many of automation testers like you and me were waiting for this news and its finally happening !

Here is the System Requirement for running Selenium with .Net core

  1. Download .Net Core 2.0 Preview 2
  2. Download Visual Studio 2017 15.3

Once installed, you need to follow following steps

Step 1

Create new Unit Test Project for .Net Core

Step 2

Add following Nuget references to the project Read more

Angular 2 automation with Protractor + Typescript + Cucumber

Dear friends,

I am very happy to release the next big course in Udemy on Angular 2 automation with Protractor + Typescript + Cucumber.

This course is very interesting and one of my long time goal/ambition to release for QA community, since I find Zero or No resource on Protractor automation testing at least with Typescript combination.

The course features following topics

  • Understand building Angular 2 application with Angular-cli
  • Understanding and working with Jasmine
  • Understanding and working with Protractor (Basic)
  • Understanding and working with Protractor (Advanced)
  • Working with Cucumber and Protractor with Typescript

The course has not only covered very basic topics on Protractor, but it has also covered some of the advanced concepts which are required for production ready and industry standard.

Here is the complete introduction 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

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