Skip to content

fix: bring page to front when isolation is turned on - #1300

Merged
shadowusr merged 2 commits into
masterfrom
users/shadowusr/INFRADUTY-30423.focus-debug
Jul 28, 2026
Merged

fix: bring page to front when isolation is turned on#1300
shadowusr merged 2 commits into
masterfrom
users/shadowusr/INFRADUTY-30423.focus-debug

Conversation

@shadowusr

Copy link
Copy Markdown
Member

What's done?

Context:

  • Isolation works by creating new browsing context, essentially meaning creating a new tab or window
  • When we perform isolation on older browsers, the window becomes not focused until the next iteration
  • This leads to "focus" states on elements to be absent in that window
  • We didn't see this issue in Testplane 8, because resetCursor was true by default and cursor reset brings the window into focus
  • On Testplane 9, resetCursor is false by default and this issue became apparent
  • Interestingly, this issue won't reproduce on newer browsers like Chrome 144. Supposedly, due to this commit: https://chromium.googlesource.com/chromium/src/+/b5c6f8ac5bb0947e3b772b32350132dfa6426847 that changes the way session window works.

How I tested?

Reproduced the issue on the following minimal case:

await browser.url("https://nda.ya.ru/t/Hbwgz3kb7jqnAM");

await browser.pause(3000);

await browser.saveScreenshot('screenshot-focus.png');

On chrome 123 running with selenoid locally, with headless=false, resetCursor=false, isolation=true.

Verified that this issue went away after the fix.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f36c1e7d32

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/existing-browser.ts Outdated
@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown

✅ Testplane E2E run succeed

Report

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown

✅ Testplane browser-env run succeed

Report

@shadowusr
shadowusr force-pushed the users/shadowusr/INFRADUTY-30423.focus-debug branch from f36c1e7 to 0a1a309 Compare July 26, 2026 20:19
@pkg-pr-new

pkg-pr-new Bot commented Jul 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/gemini-testing/testplane@1300

commit: 8c90506

Comment thread src/browser/existing-browser.ts Outdated
@shadowusr
shadowusr force-pushed the users/shadowusr/INFRADUTY-30423.focus-debug branch from 0a1a309 to 8c90506 Compare July 28, 2026 10:20
@shadowusr
shadowusr merged commit ee44b2a into master Jul 28, 2026
9 checks passed
@shadowusr
shadowusr deleted the users/shadowusr/INFRADUTY-30423.focus-debug branch July 28, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants