Static
classStatic
cssStatic
idStatic
jsLocates an elements by evaluating a JavaScript expression. The result of this expression must be an element or list of elements.
The script to execute.
Rest
...var_args: any[]The arguments to pass to the script.
A new JavaScript-based locator function.
Locates an elements by evaluating a JavaScript expression. The result of this expression must be an element or list of elements.
A new JavaScript-based locator function.
Static
linkLocates link elements whose visible text matches the given string.
The link text to search for.
The new locator.
Static
nameStatic
partialLocates link elements whose visible text contains the given substring.
The substring to check for in a link's visible text.
The new locator.
Static
tagLocates elements with a given tag name.
The tag name to search for.
The new locator.
Use () By.css(tagName) instead.
Static
xpathLocates elements matching a XPath selector. Care should be taken when
using an XPath selector with a WebElement as WebDriver
will respect the context in the specified in the selector. For example,
given the selector //div
, WebDriver will search from the document root
regardless of whether the locator was used with a WebElement.
The XPath selector to use.
The new locator.
Generated using TypeDoc
Typings for lib/by.js Describes a mechanism for locating an element on the page.
Final