Clean up Selenium webdriver code example
This commit is contained in:
parent
c78a3ff714
commit
d8cd9b71b0
1 changed files with 8 additions and 8 deletions
|
@ -49,14 +49,14 @@ and where to find Electron's binary:
|
||||||
```javascript
|
```javascript
|
||||||
var webdriver = require('selenium-webdriver');
|
var webdriver = require('selenium-webdriver');
|
||||||
|
|
||||||
var driver = new webdriver.Builder().
|
var driver = new webdriver.Builder()
|
||||||
// The "9515" is the port opened by chrome driver.
|
// The "9515" is the port opened by chrome driver.
|
||||||
usingServer('http://localhost:9515').
|
.usingServer('http://localhost:9515')
|
||||||
withCapabilities({chromeOptions: {
|
.withCapabilities({chromeOptions: {
|
||||||
// Here is the path to your Electron binary.
|
// Here is the path to your Electron binary.
|
||||||
binary: '/Path-to-Your-App.app/Contents/MacOS/Atom'}}).
|
binary: '/Path-to-Your-App.app/Contents/MacOS/Atom'}})
|
||||||
forBrowser('electron').
|
.forBrowser('electron')
|
||||||
build();
|
.build();
|
||||||
|
|
||||||
driver.get('http://www.google.com');
|
driver.get('http://www.google.com');
|
||||||
driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');
|
driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');
|
||||||
|
|
Loading…
Reference in a new issue