Skip to content

Commit

Permalink
Moves bidi check into useragentToBrowserObject
Browse files Browse the repository at this point in the history
  • Loading branch information
mhassan1 committed Oct 10, 2024
1 parent 64c86a7 commit 87763b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 5 additions & 0 deletions test/polyfills/remotetest.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ async function main() {
seleniumVersion: "3.5.2"
};
}
if (o.browserName === 'chrome' && ['87.0', '88.0', '89.0', '90.0'].includes(o.browserVersion)) {
// Chrome versions 87-90 act like they support BiDi, but they don't
// TODO: remove this check if BrowserStack or WebDriverIO fixes this
o["wdio:enforceWebDriverClassic"] = true;
}
return o;
}
}
Expand Down
9 changes: 1 addition & 8 deletions test/polyfills/test-job.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ module.exports = class TestJob {
this.results = undefined;
this.lastUpdateTime = 0;
this.duration = 0;

// Chrome versions 87-90 act like they support BiDi, but they don't
// TODO: remove this check if BrowserStack or WebDriverIO fixes this
const skipBiDi = capability.browserName === 'chrome' &&
['87.0', '88.0', '89.0', '90.0'].includes(capability.browserVersion);

// BrowserStack options https://www.browserstack.com/automate/capabilities
this.capabilities = _.merge(
{
Expand All @@ -47,8 +41,7 @@ module.exports = class TestJob {
debug: true,
consoleLogs: "errors",
networkLogs: true
},
...(skipBiDi && { "wdio:enforceWebDriverClassic": true })
}
},
capability
);
Expand Down

0 comments on commit 87763b7

Please sign in to comment.