In association with heise online

11 July 2012, 15:13

Test interface for browsers to be standardised

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

W3C logo The first draft of the WebDriver API has been delivered by the World Wide Web Consortium (W3C), offering an interface to control browsers remotely. This functionality is used primarily for automated testing of web applications.

The WebDriver API is very similar to the interface of the same name in the free test framework Selenium 2. At the core of the design is the WebElement, a DOM object that the function findElement() returns. It expects a Locator, composed of two strings specifying a strategy that should be used to locate elements and a value to pass to this strategy. This API call therefore allows elements to be located by things such as XPath, ID, CSS selector or link text.

It is complemented by other methods which allow you to read and set various attributes of WebElements. Information about which strings fill text boxes, which buttons triggered a click and the actual selection of a select element can also be determined. Functions such as the direct triggering of DOM events which existed in Selenium 1 are now implemented through JavaScript code in the W3C API and Selenium 2.


Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit