-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
27 lines (24 loc) · 816 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// random commit #random 62
var webdriver = require('selenium-webdriver');
// Input capabilities
var capabilities = {
'browserName': 'chrome',
'os': 'os x',
'build': process.env.BROWSERSTACK_BUILD_NAME,
'project': process.env.BROWSERSTACK_PROJECT_NAME,
'os_version': 'high sierra',
'browserstack.local': 'true',
'browserstack.localIdentifier': process.env.BROWSERSTACK_LOCAL_IDENTIFIER,
'browserstack.user': process.env.BROWSERSTACK_USERNAME,
'browserstack.key': process.env.BROWSERSTACK_ACCESS_KEY
}
var driver = new webdriver.Builder()
.usingServer('http://hub-cloud.browserstack.com/wd/hub')
.withCapabilities(capabilities)
.build();
driver.get('http://localhost:8099').then(function () {
driver.getTitle().then(function (title) {
console.log(title);
driver.quit();
});
});