Merge pull request #2578 from christian-bromann/patch-1
minor wording fix, updated example
This commit is contained in:
		
				commit
				
					
						474f92e41b
					
				
			
		
					 1 changed files with 11 additions and 10 deletions
				
			
		| 
						 | 
					@ -72,7 +72,7 @@ driver.quit();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Setting up with WebdriverIO
 | 
					## Setting up with WebdriverIO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[WebdriverIO](http://webdriver.io/) provided a Node package for testing with web driver.
 | 
					[WebdriverIO](http://webdriver.io/) provides a Node package for testing with web driver.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### 1. Start chrome driver
 | 
					### 1. Start chrome driver
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,7 +86,7 @@ Only local connections are allowed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Remember the port number `9515`, which will be used later
 | 
					Remember the port number `9515`, which will be used later
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### 2. Install WebDriverJS
 | 
					### 2. Install WebdriverIO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
$ npm install webdriverio
 | 
					$ npm install webdriverio
 | 
				
			||||||
| 
						 | 
					@ -96,22 +96,23 @@ $ npm install webdriverio
 | 
				
			||||||
```javascript
 | 
					```javascript
 | 
				
			||||||
var webdriverio = require('webdriverio');
 | 
					var webdriverio = require('webdriverio');
 | 
				
			||||||
var options = {
 | 
					var options = {
 | 
				
			||||||
	host: "localhost", // Use localhost as chrome driver server 
 | 
					    host: "localhost", // Use localhost as chrome driver server 
 | 
				
			||||||
    port: 9515,        // "9515" is the port opened by chrome driver.
 | 
					    port: 9515,        // "9515" is the port opened by chrome driver.
 | 
				
			||||||
    desiredCapabilities: {
 | 
					    desiredCapabilities: {
 | 
				
			||||||
            browserName: 'chrome',
 | 
					        browserName: 'chrome',
 | 
				
			||||||
            chromeOptions: {binary: '/Path-to-Your-App.app/Electron'} // Path to your Electron binary.
 | 
					        chromeOptions: {binary: '/Path-to-Your-App.app/Electron'} // Path to your Electron binary.
 | 
				
			||||||
        }
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
webdriverio
 | 
					var client = webdriverio.remote(options);
 | 
				
			||||||
    .remote(options)
 | 
					
 | 
				
			||||||
 | 
					client
 | 
				
			||||||
    .init()
 | 
					    .init()
 | 
				
			||||||
    .url('http://google.com')
 | 
					    .url('http://google.com')
 | 
				
			||||||
    .setValue('#q', 'webdriverio')
 | 
					    .setValue('#q', 'webdriverio')
 | 
				
			||||||
    .click('#btnG')
 | 
					    .click('#btnG')
 | 
				
			||||||
    .title(function(err, res) {
 | 
					    .getTitle().then(function(title) {
 | 
				
			||||||
        console.log('Title was: ' + res.value);
 | 
					        console.log('Title was: ' + title);
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    .end();
 | 
					    .end();
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue