Posts

Showing posts from September, 2017

Selenium Grid with Docker

What is Selenium Grid? Selenium Grid is a part of Selenium component which supports Distributed test execution and it will let us run our tests on Multiple Operating systems against different browsers simultaneously. Traditional Selenium grid steps are, 1.Start Hub and connect all the nodes to it using below commands      Hub : java -jar selenium-server-standalone-3.xx.x.jar -role hub      Node1 : java -jar selenium-server-standalone-3.xx.x.jar -role node -hub              http://<systemip>:4444/grid/register -port 5556 -browser browserName=firefox      Node2 : java -jar selenium-server-standalone-3.xx.x.jar -role node -hub              http://<systemip>:4444/grid/register -port 5557 -browser browserName=chrome 2.Define the Desired capability to identify the OS platform and OS browser for execution     DesiredCapabilities desCap = null;     if(browser.equals("firefox")){         desCap=DesiredCapabilities.firefox();         desCap.setBrowserNa

Useful Design Patterns in Selenium Webdriver script

In this blog, we are going to discuss about different test design patterns and which one do we need to adhere while writing the Selenium webdriver test scripts. The most popular design patterns in Selenium are, 1) Singleton Pattern 2) Page object model First we will look into the question - What is Design Pattern?                  Design Pattern is the Programmer follows the good practices while writing program for the application or product to resolve/rectify the commonly occurring issues. In other words, It is a kind of strategy having structured program approach towards to show interactions and relationships between Classes and Objects. We have different kinds of Design patterns with its own Pros and Cons. The Design pattern types are, Creational Pattern - Practice of initiating the class object without using new operator for Object initiation. Structural Pattern - Practice of implementing inheritance in between Class, Object and interface to achieve new functionali