Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {Capability, Browser} from 'selenium-webdriver';
const capabilities = {
[Capability.PLATFORM]: 'WINDOWS',
[Capability.BROWSER_NAME]: Browser.CHROME,
[Capability.VERSION]: 73,
};
// browserstack specific capabilities - https://www.browserstack.com/automate/capabilities
if (process.env.CI) {
capabilities['browserstack.local'] = true;
capabilities['browserstack.localIdentifier'] = process.env.BROWSERSTACK_LOCAL_IDENTIFIER || process.env.TRAVIS_JOB_NUMBER;
capabilities['browserstack.networkLogs'] = true;
capabilities.os = 'WINDOWS';
capabilities.os_version = '10';
capabilities.browser = Browser.CHROME;
capabilities.browser_version = '73';
}
export default capabilities;
'#extraCapabilities'() {
const capabilities: any = { 'browserstack.local': 'true' };
assert.deepEqual(tunnel.extraCapabilities, capabilities);
capabilities['browserstack.localIdentifier'] = tunnel.tunnelId = 'foo';
assert.deepEqual(tunnel.extraCapabilities, capabilities);
},
'#extraCapabilities'() {
const capabilities: any = { 'browserstack.local': 'true' };
assert.deepEqual(tunnel.extraCapabilities, capabilities);
capabilities['browserstack.localIdentifier'] = tunnel.tunnelId = 'foo';
assert.deepEqual(tunnel.extraCapabilities, capabilities);
},
get extraCapabilities(): Object {
const capabilities: any = {
'browserstack.local': 'true'
};
if (this.tunnelId) {
capabilities['browserstack.localIdentifier'] = this.tunnelId;
}
return capabilities;
}
var browsers = ALL_BROWSERS.map(function(b) {
b['browserstack.local'] = 'true';
b['browserstack.debug'] = 'true';
b['browserstack.localIdentifier'] = process.env.BROWSERSTACK_LOCAL_IDENTIFIER;
b['url'] = url;
return b;
});