https://github.com/slavahatnuke/plus.webdriver-sizzle
https://github.com/slavahatnuke/plus.webdriver-sizzle
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/slavahatnuke/plus.webdriver-sizzle
- Owner: slavahatnuke
- Created: 2017-03-15T10:15:34.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-28T11:51:05.000Z (about 8 years ago)
- Last Synced: 2025-03-02T14:50:50.404Z (3 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
plus.webdriver-sizzle
==============
Its based on [webdriver-sizzle](https://www.npmjs.com/package/webdriver-sizzle) and fixes issues related to the latest `selenium-webdriver` updates issues.
Locate a [selenium-webdriver](https://npmjs.org/package/selenium-webdriver) element by sizzle CSS3 selector.```javascript
var selenium = require('selenium-webdriver');
var sizzle = require('plus.webdriver-sizzle');
var driver = new seleniumWebdriver.Builder().forBrowser('chrome').build();
var $ = sizzle(driver);
// Find the first element with class btn and click it
$('.btn').click().then(function() {
console.log('ok')
});// Count the paragraphs
$.all('p').then(function (elements) {
console.log(elements.count);
});```