Home Authors Posts by rahul12august

rahul12august

40 POSTS 0 COMMENTS
In this post, we will discuss how to perform right click if we are using Selenium WebDriver for automation testing. For this purpose, we need to use Action class . Under Action class various method are defined for serving various actions that are needed to be performed while testing....
In this post, we will discuss drag and drop using WebDriver. For this purpose, we need to use Action class. Under Actions, class various method is defined to serve various actions that are needed to be performed. One such method is dragAndDrop(). Below is the sample code: Actions action = new...
Java provides the java.util.regex package for pattern matching with regular expressions. A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings, using a specialized syntax held in a pattern. They can be used to search, edit, or manipulate text...
Below is a basic code on how to read excel file. As per your requirement you can read the data for excel and play around it. import java.io.File; import java.io.FileInputStream; import java.io.IOException; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class ReadExcelFile{ public void readExcel(String filePath,String fileName,String sheetName) throws IOException{ //Create a object of File class to...
The Object class is the parent/base class of all the classes in java by default. An object class can be used in upcasting. If you don't know the type of any object we can use Object class to refer that object. Let's take an example, there is getObject() method that returns...
In Java we have Date class available in java.util package which encapsulates the current date and time. The Date class have two constructors mentioned below: 1 Date( ) This constructor initializes the object with the current date and time. This doesn't require any argument. 2 Date(long millisec) We need to provide an argument to this constructor...
The Collection Classes: Java provides a set of standard collection classes that implement Collection interfaces. Some of the classes provide full implementations that can be used as-is and others are abstract class, providing skeletal implementations that are used as starting points for creating concrete collections. The standard collection classes are summarized...
An exception is any sort of deviation from what we a program is expecting. When an Exception occurs the normal flow of the program is disrupted and the program/Application terminates abnormally, which is not recommended, therefore these exceptions needs to be handled. The following is an array is declared...
How to set test case priority in TestNG? Setting Priority in TestNG //Code Snippet package TestNG; import org.testng.annotations.*; public class SettingPriority { // m1 , m2 and m3 are three methods @Test(priority=0) public void m1() { } @Test(priority=1) public void m2() { } @Test(priority=2) public void m3() { } } Test Execution Sequence: 1. m1 2. m2 3. m3
In this post we will discuss about different type of framework which we can use to automate browser using Selenium WebDriver. Below are the different types of frameworks: 1.Module Based Testing Framework: In this framework we divide the whole project in various isolated and independent module. This division can be either on...

Follow us on Facebook

Facebook Page Loading...