Selenium Knowledgebase

Title Language Preview Date Posted
Execute JavaScript using Selenium WebDriver in C# C#

The following script shows how to use IJavaScriptExecutor, C#'s version of Java's JavascriptExecu

27/04/2021
How to open a new tab using Selenium WebDriver? (Java) Java

The following code shows how to open a link in a new tab using Keys.chord(...) in the first test

27/04/2021
Using Selenium Web Driver to retrieve value of a HTML input (Java) Java

To get the text entered into an input element, use element.getAttribute("value") where element is

27/04/2021
How to perform mouseover function in Selenium WebDriver using Java? Java

To mouse over elements, you need to use the Actions class to build and perform the MoveToElement

27/04/2021
Clear text from textarea with selenium (Java) Java

As shown clearly in the script for this example, you simply need to use element.clear() where ele

27/04/2021
Test if element is present using Selenium WebDriver? (Java) Java

The easiest way to check if an element is present on a web page is to find all the elements match

27/04/2021
Selenium c# Webdriver: Wait Until Element is Present C#

To wait for an element to be visible in C# use WebDriverWait and an expected condition as shown b

27/04/2021
Is there a way to get element by XPath using JavaScript in Selenium WebDriver? Javascript

To find an element by its xpath, use the driver.findElement(By.xpath("")) method where the quotat

27/04/2021
Wait for page load in Selenium (Java) Java

To wait until the page is loaded, the easiest way is to use a WebDriverWait to force the driver t

27/04/2021
How do I find an element that contains specific text in Selenium Webdriver (Python)? Python

To locate an element, you need to find the element based on its XPath as you can specify the text

27/04/2021
How can I take a screenshot with Selenium WebDriver? (Java) Java

You can save screenshots using the TakeScreenshot driver.

27/04/2021
Difference between webdriver.Dispose(), .Close() and .Quit() C#

Of the three methods, dispose() is only used in C# tests and means the exact same thing as quit()

27/04/2021

Pages