search

Class WebElement

Exported By
All Known Direct Subclasses
Alias for

Represents a DOM element. WebElements can be found by searching from the document root using a WebDriver instance, or by searching under another WebElement:

 driver.get('http://www.google.com');
 var searchForm = driver.findElement(By.tagName('form'));
 var searchBox = searchForm.findElement(By.name('q'));
 searchBox.sendKeys('webdriver');

new WebElement( driver, id )

Parameters
driverWebDriver

the parent WebDriver instance for this element.

id(IThenable<string>|string)

The server-assigned opaque ID for the underlying DOM element.

Instance Methods

Static Functions