Selenium Knowledgebase

Title Language Preview Date Posted
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

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

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

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

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

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

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

WebElements can be located with selenium webdriver using XPaths.

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

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

How can I take a screenshot with Selenium WebDriver? (Java) Java

You can save screenshots using the TakeScreenshot driver.

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()

Selenium: How to use 'Waits' in Selenium Java Java

With Selenium, there are three ways of waiting for elements: explicit wait, implicit wait and flu