mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix: stricter condition for Firefox codegen tests workaround (#20998)
This patch fixes the following tests on WebKit @ Darwin: - library/inspector/cli-codegen-2.spec.ts:197:7 › cli codegen › should download files - library/inspector/cli-codegen-2.spec.ts:428:7 › cli codegen › should update hover model on action
This commit is contained in:
parent
d7a0b3bb4e
commit
1b441ef4f0
@ -239,7 +239,7 @@ export class Recorder {
|
|||||||
const activeElement = this._deepActiveElement(this.document);
|
const activeElement = this._deepActiveElement(this.document);
|
||||||
// Firefox dispatches "focus" event to body when clicking on a backgrounded headed browser window.
|
// Firefox dispatches "focus" event to body when clicking on a backgrounded headed browser window.
|
||||||
// We'd like to ignore this stray event.
|
// We'd like to ignore this stray event.
|
||||||
if (activeElement === this.document.body)
|
if (userGesture && activeElement === this.document.body)
|
||||||
return;
|
return;
|
||||||
const result = activeElement ? generateSelector(this._injectedScript, activeElement, this._testIdAttributeName) : null;
|
const result = activeElement ? generateSelector(this._injectedScript, activeElement, this._testIdAttributeName) : null;
|
||||||
this._activeModel = result && result.selector ? result : null;
|
this._activeModel = result && result.selector ? result : null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user