webdriver-sizzle
v0.3.4
Published
Locate a selenium-webdriver element by sizzle CSS selector
Downloads
1,754
Readme
webdriver-sizzle
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);
});