Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling BiDi mode - fixing test failures #1152

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/nbrowser/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ setOptionsModifyFunc(({chromeOpts, firefoxOpts}) => {
// Set "kiosk" printing that saves to PDF without offering any dialogs. This applies to regular
// (non-headless) Chrome. On headless Chrome, no dialog or output occurs regardless.
chromeOpts.addArguments("--kiosk-printing");
// Latest chrome version 127, has started ignoring alerts and popups when controlled via a
// webdriver.
// https://github.com/SeleniumHQ/selenium/issues/14290
// According to the article above, popups and alerts are still shown in `BiDi` sessions. While we
// don't have latest webdriver library (where the new `enableBiDi` method is exposed), it can be
// toggled by using the `set` method in `capabilities` interface, as it is done here (long URL):

// eslint-disable-next-line max-len
// https://github.com/shs96c/selenium/blob/ff82c4af6a493321d9eaec6ba8fa8589e4aa824d/javascript/node/selenium-webdriver/firefox.js#L415
chromeOpts.set('webSocketUrl', true);

chromeOpts.setUserPreferences({
// Don't show popups to save passwords, which are shown when running against a deployment when
Expand Down
Loading