mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Ignoring alert for chrome 127+
This commit is contained in:
parent
4bfcbf20ac
commit
a369363111
@ -223,6 +223,16 @@ export class GristWebDriverUtils {
|
||||
* Accepts an alert.
|
||||
*/
|
||||
public async acceptAlert() {
|
||||
const caps = await this.driver.getCapabilities();
|
||||
if (caps.getBrowserName() === 'chrome') {
|
||||
const version = caps.getBrowserVersion();
|
||||
// Check if major version is 127 or higher, if yes, the alert won't be shown.
|
||||
// https://github.com/SeleniumHQ/selenium/issues/14290
|
||||
// TODO: track this issue if it was resolved.
|
||||
if (version && parseInt(version.split('.')[0], 10) >= 127) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
await (await this.driver.switchTo().alert()).accept();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user