Steps to reproduce
- Serve a page that calls
alert() synchronously during load:
<!DOCTYPE html>
<html>
<body>
<script>alert("sync-during-load");</script>
<div id="after">after-alert-content</div>
</body>
</html>
- Create a WebDriver session against
moli serve, then:
POST /session/{id}/url -> alert page (hangs 20s+, no response)
GET /session/{id}/title -> timeout
DELETE /session/{id} -> timeout, session unrecoverable
Expected
The session stays alive. The dialog is auto-dismissed or queued, and every command (including session teardown) still responds.
Actual
Every subsequent command — including DELETE /session — times out. The session cannot be recovered.
Control: the same command sequence against a page without alert() completes in <0.1 s per command.
The CDP path handles the same page correctly: Page.javascriptDialogOpening fires, Page.handleJavaScriptDialog works, and the page continues loading. The defect is specific to the WebDriver command pipeline.
Environment
- moli 1.1.10 (9b2f86b), Linux, WebDriver Classic endpoint
- Deterministic since 1.1.7
Steps to reproduce
alert()synchronously during load:moli serve, then:Expected
The session stays alive. The dialog is auto-dismissed or queued, and every command (including session teardown) still responds.
Actual
Every subsequent command — including
DELETE /session— times out. The session cannot be recovered.Control: the same command sequence against a page without
alert()completes in <0.1 s per command.The CDP path handles the same page correctly:
Page.javascriptDialogOpeningfires,Page.handleJavaScriptDialogworks, and the page continues loading. The defect is specific to the WebDriver command pipeline.Environment