View Source Improve this doc

element

Search for an element on the page, starting from the document root. The located element will be returned as a WebElement JSON object. The table below lists the locator strategies that each server should support. Each locator must return the first matching element located in the DOM.

Usage

1
2
browser.element(selector);

Parameters

Param Type Details
selector String selector to query the element

Returns

  • <String>: A WebElement JSON object for the located element.