Posts

Showing posts from December, 2018

Selenium Grid Part 2 : Grid setup and run test case on multiple browsers

Image
Please read the Part1 of selenium grid before going through this. In this tutorial, we will start off with the setup where we start a hub and register three different nodes with different browser capabilities. First Node with Chrome Browser Second Node with Firefox browser Third Node with IE browser Here i am taking a simple authentication example and we write selenium java code using DesiredCapabilities, Options Class and RemoteWebdriver Class. The same test case will be run on all the three nodes. This video gives a good idea on how to distribute the test case execution among multiple environment or platforms. For more details please watch the video below

Selenium Grid Part1 : Introduction

Image
Today we will go through brief introduction to Selenium Grid. Selenium Grid is used to distribute the test cases across multiple environments. Selenium Grid has two main components 1) Hub 2) Node. Hub is like a controller and different nodes with different environment and browser capabilities connects to the hub. This tutorial also goes through how to run hub using standalone server jar file and how to connect a node to hub. For more details please watch the video below

Setup Log4J logging in Selenium Java with example

Image
Today we will go through step by step process on how to include log4j logging mechanism into a selenium project. Here we create log4j properties file where we set up the log levels i.e. logger and later we define the appenders for both console and log file and we also define formatters. Later a java example is written with log4j.properties file is included in the selenium example and we see the loggers logging into both console and the log file. For more details please watch the video below

Reading Configurations from Properties File : Selenium Java Example

Image
Today we will go through 1) How to create a configuration properties file 2) How to add key and value from config properties file We will take an example and read the value for a key from the configuration file by using Properties class. There are several get methods available to fetch the value for a key which we make use of in the following example. For more details watch the below video till the end.

Selenium Grid Part1 : Introduction

Image
Selenium Grid: This blog will go through the introduction of Selenium Grid Selenium Grid is used to distribute the test cases across multiple environment and helps in speeding up the execution. Selenium Grid has two main components a) Hub b) Node Hub acts as a controller and Nodes with different environment and browser capabilities connects to a hub. Whenever a test case needs to be executed, the test case is submitted to a hub and hub will decide based on the capabilities and environment which node the test case will be executed on based on the nodes which are connected to that hub. For more details go through the following video.

Using TestNG Assertion in Selenium - Soft Assertion and Hard Assertion

Image
Today we will see how to use TestNG Assertion in Selenium Java Initially we will take a look at the difference between assert and validate and later on we will see an example of SoftAssert and Hard Assert.. Hard Assert will stop the execution and Soft Assert will continue the execution. In this we will simply check for a title and use assert class and Softassert class. For further details go through the video tutorial below.

Capture Screenshots Selenium Java Example

Image
Today we will see how to take screenshot of any web page under automation using Takescreenshot interface. In this we will go through an example and later on we will see hot to add date and time as a prefix to the screenshot file name to make them dynamic. For further details, please watch the below video.

TestNG Factory Annotation Example | Run Multiple Tests

Image
@Factory annotation TestNG In the last blog we saw how to run multiple test cases using TestNG Runner class, in this blog we will see how to use @factory annotation to running multiple test cases. In earlier blog we have seen different annotations available in TestNG, In this we use factory annotation to work with simple tests by creating multiple classes each having one simple test case. Please watch the below video and see how to do it step by step. YouTube : https://bit.ly/2oCwC5N Twitter : @rajtechtrainer Facebook : https://www.facebook.com/raj.techtrainer Google Plus : https://plus.google.com/114713735444684008024 For any training requirements both online and offline or Corporate training please contact us at techtrainerraj at gmail.com

TestNG Runner Class Example | Run multiple tests

Image
TestNG Runner Class There are three ways of running multiple tests 1) Using testng xml file 2) Using TestNG runner class 3) Using @Factory annotation Earlier we have covered how to run multiple test cases using testng.xml file and in the next blog we will see how to use factory annotation to run multiple tests. In this video we will go through step by step process of creating a simple Java class which makes use of  TestNG class to run the tests using run method and setTestSuite methods. For setTestSuite we make use of testng xml files. For further details go through the following video YouTube : https://bit.ly/2oCwC5N Twitter : @rajtechtrainer Facebook : https://www.facebook.com/raj.techtrainer Google Plus : https://plus.google.com/114713735444684008024 For any training requirements both online and offline or Corporate training please contact us at techtrainerraj at gmail.com

TestNG Listeners ITestListener and ISuiteListener Example

Image
TestNG Listeners TestNG Listeners are the interfaces which provides method to change the behavior of TestNG. There are several listeners available in TestNG and in this tutorial we will take a look at ITestListener and ISuiteListener. In this example we will add debug messages to the methods which are available in the the two listeners which we have taken the examples of. For further details please watch the below video and don't forget to subscribe to our channel here https://bit.ly/2oCwC5N Get in touch with us if you have any queries related to this topic @ techtrainerraj at gmail.com

Selenium Java Data Driven Test Case Example using Apache POI Excel Library

Image
In this tutorial, we will go through step by step process on how to use the data from .xlsx (XSSF) to drive the test case. In this Data Driven example using apache POI, i have taken form authentication example from the website http://the-internet.herokuapp.com/login . Excel workbook contains the data for user name and password which is fed to the test method using @DataProvider Annotation of TestNG. @DataProvider method will fetch the data from excel sheet using apache POI XSSF library and feeds the data to the @Test method. For more details please go through the video. Please subscribe to the youtube channel to get the latest updates.

TestNG Dataprovider Annotation Example | @DataProvider Annotation Example

Image
@Dataprovider Annotation TestNG: @DataProvider annotation method supplies the data to @Test annotation method. Data provider annotation returns a two dimensional array of Objects and the same needs to be supplied to method which has @Test annotation. For more details, please watch the video tutorial here. Please subscribe and if you have any comment contact me at techtrainerraj at gmail.com

Selenium Java working with basic web controls |TextBox,Button,Radio Butt...

Image
Hi All, This video will go through step by step process of working with some of the basic controls available on any web page such as Text Box/Edit Box Button Radio Button Drop Down Check Box We will also take a look at three main drop down selection methods i.e selectbyindex selectbyvisibletext selectbyvalue If you have any queries/comment please contact me.

Selenium Java Locators | By ID,Name,Class,Xpath, CSS Selector,TagName, l...

Image
Hello All, Welcome again. This video tutorial goes through step by step process on how to identify a web element using selenium There are 8 different type of location strategies available in Selenium and we will see how to identify them using this video tutorial. Web element location strategies discussed in this video are Location by Id Location by Name Location by Class Location by Link Text Location by Partial Link Text Location by Tag Name For Location by CSS Selector and XPath please go through the video https://www.youtube.com/watch?v=H7OY_NM0BhA&t=351s If you have any queries/comments please get in touch with me