webdriver-sizzle

0.3.4 • Public • Published

webdriver-sizzle NPM version Build Status

Locate a selenium-webdriver element by sizzle CSS selector.

var selenium = require('selenium-webdriver'),
    sizzle = require('webdriver-sizzle'),
    driver = new webdriver.Builder()
      .withCapabilities(webdriver.Capabilities.phantomjs())
      .build()
    $ = sizzle(driver)
 
// Find the first element with class btn and click it
$('.btn').click()
 
// Count the paragraphs
$.all('p').then(function (elements) {
  console.log(elements.count);
});
 

Package Sidebar

Install

npm i webdriver-sizzle

Weekly Downloads

1,481

Version

0.3.4

License

MIT

Unpacked Size

33.1 kB

Total Files

20

Last publish

Collaborators

  • benbuckman
  • goodeggs-admin
  • hurrymaplelad
  • michaelkebbekus