xPath definitions for descendant, ancestor, sibling, preceding, following
An object A is called a descendant of an object B, if either A is a child of B or A is a child of an object C that...
An object A is called a descendant of an object B, if either A is a child of B or A is a child of an object C that...
Dependencies: extentreports-3.0.0.jar freemarker-2.3.28.jar mongo-java-driver-2.10.1.jar or org.jsoup jsoup 1.8.3 org.xerial sqlite-jdbc 3.8.11.1 org.freemarker freemarker 2.3.23 org.mongodb mongodb-driver 3.0.4 Step 1: Create a baseclass which implements setup and teardown of extent...
import java.io.File; import org.testng.Assert; import org.testng.ITestResult; import org.testng.SkipException; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import com.relevantcodes.extentreports.ExtentReports; import com.relevantcodes.extentreports.ExtentTest; import com.relevantcodes.extentreports.LogStatus; import libraries.*; public class ExtentReportsClass { ExtentReports...
Following library function can be used to clear the text set in any “Text field” before setting new value to it public static void clearAndSet(WebElement element, String value) {...
In earlier post, POM framework was identified which segregates verification and page objects identification under different classes (Page and workflow classes). With this approach, data is still manually entered...
One can always interact with page objects using Selenium webdriver something like this: public class myFirstWebDriver() { @Test public void validate_login_page() { WebDriver wd = new FirefoxDriver(); wd.manage().timeouts().implicitlywait(10, TimeUnit.SECONDS);...
Sometimes it is necessary to get the Attribute / run time value of Css property of a WebElement. We can use following code-snippet to get run time value of...
Rules for POJO in java 1. Class needs to be Public 2. Properties are Private 3. Every property should have public getter and setters 4. Public default constructor Mandatory...
Pre-requisites Installations to Generate Extent Reports: Following softwares needs to be configured / installed on local system: 1. JDK 2. TestNG 3. Extent Report Jars Download here 4. extent-config.xml...
In order to implement POM in we can adopt following project structure: Common function Init — which takes care of Browser launch Page objects — This defines the Page...