Tag: visual studio

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

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

FindInSet an best way to verify Collection with Specflow Table

In this post we will discuss about working with FindInSet method of Specflow 2.1 (earlier versions don’t have this method).

FindInSet of Specflow v2.1

With Specflow v2.1, we now have a very handy method to verify an Specflow Table against an collection, which comes very handy while working with large set of data collection and verifying the same against an feature file specflow table something like this

Here is the complete video of the above discuss along with code demo

Here is the complete source code of the above video

Read more

Udemy course of ExecuteAutomation is chosen as BestSelling course

Hi Friends,

I am very happy to announce that our “Automation framework development with Selenium C# (Advanced)” course is chosen as the bestselling course.

The course has served many professionals to get their daily job done, since it has an ready-to-use framework along with many ancillary features (like reporting, test harness etc)

If you are not aware of the course content, here is a sneak peek video of the same

Here are the other courses released by ExecuteAutomation

Thank you once again !

Karthik KK

Identifying broken links with Selenium C#

In this post we will discuss one of the common question asked by many readers of ExecuteAutomation, which is the topic name.

Its actually fairly very simple though, I just wrote 10 lines of code to achieve it (you might have even better solution than one I have)

So, here is the pseudo code

  1. Navigate to the URL of site you are interested in
  2. Get all the links of page using FindElements(By.Tag(“a”)) method
  3. Iterate through the page URLs and get the attributes href using GetAttribute(“href”) method
  4. Use Simple WebRequest and HttpWebResponse class to get the page response and status code.

So, here is the output

Here is the source code

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

Code to run Selenium grid test on multiple docker containers

In the last post we discussed how to setup selenium grid containers with Docker, in this post we will discuss how to run test on multiple docker containers in parallel using docker command.

Here is the complete source code of this article

https://github.com/executeautomation/SeleniumParallelSample

Sample snippet

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