Handling HTML Drop-down fields Select class is the predefined class in Selenium WebDriver and it has predefined methods for performing various operations on Drop-down fields We can use the below commands: selectByVisibleText() selectByIndex() selectByValue() deselectByVisibleText() – Not applicable for dropdown fields deselectByIndex() – Not applicable for dropdown fields deselectByValue() – Not applicable for dropdown fields isMultiple()… (0 comment)

Handling Alerts When the Alerts are displayed, they won’t allow you to perform any other operation on the website Practical Demonstration UnhandledAlertException will be displayed Same exception will be displayed if you close the browser without handling the alert. Types of Alerts Information Alert – hdfc netbanking Confirmation Alert – hdfc netbanking Prompt Alert – internet… (0 comment)

Waiting mechanism in Selenium Waiting mechanism in Selenium and Java can be categorized as below:   Demonstrate a program which don’t use waiting mechanism to understand the importance of waiting mechanism in Selenium NoSuchElementException Using Thread.sleep() in Java to overcome the waiting problems Implicit Wait  – Instead of halting the program till the specified time… (0 comment)

Handling multiple windows We get NoSuchElementException, if we try to perform operations on a new window, without switching to it during Selenium Automation Windows can be opened either as new window or new tab. WebDriver interface has two predefined methods getWindowHandles() and switchTo() , which helps us in handling multiple browser windows. getWindowHandles() – Used to retrieve… (0 comment)

findElements() – Used to find and return more than one Web Element findElement() versus findElements() Practical Demonstrations Locating the ‘LogIn’ button and retrieve the label text on the button Locating the Options in Multi-selection box field and retrieve all the options text Locating a set of hyperlinks under a section and opening them one by one… (0 comment)

XPath Expressions Out of all the locators, XPath Expressions are the powerful locators and can be able to locate any type of UI element.   Types of XPath Expressions: XPath expressions can be classified into the below two types: Absolute XPath Relative XPath Absolute XPath  Using XPath Expressions, we can navigate through the HTML code… (0 comment)

Packages Packages are created to group related classes/interfaces/other files. We generally group things to organize them better for locating them easily. Package creation – Create a new Java project say Facebook and group the Classes under various packages – view here Demonstrate – Accessing instances variables and methods from other class which is under the same package… (0 comment)

Arrays Using Arrays, multiple values of same data type can be stored into a single variable. Arrays can be categorized as below: Single Dimensional Array Example: int[] a = new int[3]; Demonstrate Declaring, Creating, Assigning and Accessing the single dimensional Array – Demonstrate here View the diagrammatic representation of single dimensional array here Shortcut representation… (0 comment)

Downloading and configuring Selenium 4 WebDriver in Java Projects Traditional Way – Normal Java Project   Follow the below steps for downloading and configuring the Selenium WebDriver in a Java Project: Create a new Java Project Create a new Class say Demo having main() method Create an object for ChromeDriver Class Create a new folder… (0 comment)

For FREE Testing Tutorials & Videos

X
Open chat
Contact Us on Whatsapp