Skip to content

Report a lost browser instead of reading it as a missing element - #66

Merged
PrestaEdit merged 1 commit into
devfrom
fix/v7-home
Sep 25, 2026
Merged

PrestaEdit merged 1 commit into
devfrom
fix/v7-home

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor

CommonPage::elementIsVisible(), behind isVisible(), caught every exception and returned false. When the browser disappears mid-run, chrome-php throws TargetDestroyed. That was then reported as a plain assertion failure, false must be the same as true, which looks like a shop regression.

That is how psflowdemo's DisplayHome appeared to fail on 1.7.8.11. The browser was closed by a concurrent PrestaFlow process (the defect fixed in #65), and on a fresh 1.7.8.11 shop run alone, the suite passes every time.

Fix

elementIsVisible() lets TargetDestroyed propagate. A really missing element still answers false.

Verified

  • tests/Unit/Pages/VisibilityOnLostBrowserTest.php fails without the fix. With it: OK (334 tests, 763 assertions).
  • A browser closed from another connection now surfaces as The session is destroyed..
  • The whole psflowdemo suite, on fresh Flashlight shops, one run at a time, with this branch and Give each run its own browser instead of a machine-wide one #65: all green on 1.7.8.11, 8.1.7 and 9.0.0 (Checkout, DisplayHome, Regression, Smoke, UpdateTitle).

Notes

🤖 Generated with Claude Code

…element

elementIsVisible() caught every Exception and returned false. When the
Chrome a run drives is closed under it (another PrestaFlow process
releasing the shared browser, a crash), chrome-php throws TargetDestroyed
("The session is destroyed."), and isVisible() answered "not visible".

A suite checking a block on the home page then failed with "false must be
the same as true": a lost browser disguised as a regression of the shop,
which is how psflowdemo's DisplayHome looked broken on 1.7.8.11 while the
block was served, hooked and rendered. TargetDestroyed now propagates, so
the step fails with the browser error the runner already reports. A missing
element still answers false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PrestaEdit
PrestaEdit merged commit e596c36 into dev Sep 25, 2026
9 checks passed
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.

1 participant