fix(selenium): Use ms:edgeOptions with Edge. (#12933)

This commit is contained in:
Brandon Walderman 2022-03-22 12:46:00 -07:00 committed by GitHub
parent 2a7370bad2
commit 7db40071a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,7 +159,10 @@ export class Chromium extends BrowserType {
const args = this._innerDefaultArgs(options);
args.push('--remote-debugging-port=0');
const isEdge = options.channel && options.channel.startsWith('msedge');
let desiredCapabilities = { 'browserName': isEdge ? 'MicrosoftEdge' : 'chrome', 'goog:chromeOptions': { args } };
let desiredCapabilities = {
'browserName': isEdge ? 'MicrosoftEdge' : 'chrome',
[isEdge ? 'ms:edgeOptions' : 'goog:chromeOptions']: { args }
};
try {
if (process.env.SELENIUM_REMOTE_CAPABILITIES) {
const parsed = JSON.parse(process.env.SELENIUM_REMOTE_CAPABILITIES);