One day we were writing integration tests using Protractor and WebDriverJS and simply couldn't find a proper API reference, so we generated it: http://appfigures.github.io/webdriver-js-api-reference.
- webdriver.WebDriver - The object exposed by
webdriver
(for documentation on methods likewebdriver.get()
,webdriver.findElement()
,webdriver.controlFlow()
) - webdriver.WebElement - Represents an element in the DOM such as the return value of
webdriver.findElement()
.
Here is the definition for all the available locators available on driver.By
(eg driver.By.css('#item1')
). Extracted from locators.js
:
webdriver.Locator.Strategy = {
'className': webdriver.Locator.factory_('class name'),
'class name': webdriver.Locator.factory_('class name'),
'css': webdriver.Locator.factory_('css selector'),
'id': webdriver.Locator.factory_('id'),
'js': webdriver.Locator.factory_('js'),
'linkText': webdriver.Locator.factory_('link text'),
'link text': webdriver.Locator.factory_('link text'),
'name': webdriver.Locator.factory_('name'),
'partialLinkText': webdriver.Locator.factory_('partial link text'),
'partial link text': webdriver.Locator.factory_('partial link text'),
'tagName': webdriver.Locator.factory_('tag name'),
'tag name': webdriver.Locator.factory_('tag name'),
'xpath': webdriver.Locator.factory_('xpath')
}
Generated using jsdoc-toolkit v2.4.0 (This version of jsdoc toolkit is deprecated, but v3.0 doesn't fully parse the API).
java -jar jsrun.jar app/run.js -a -t=templates/jsdoc /selenium-webdriver/**/**/*.js