You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation uses approximate version numbers and dates. Consider adding more precise information about when these changes were implemented, if available, to help users troubleshoot version-specific issues.
Drivers released in approximately 2024 and later automatically dismiss beforeunload prompts by default. If the old behavior is needed, [enable bidi]({{< ref "../bidi/" >}}).
NOTE: ChromeDriver still dismisses prompts unless `options.unhandled_prompt_behavior = 'ignore'` is also specified, in addition to enabling bidi (as recently as version 134 or later).
NOTE: ChromeDriver implemented automatically dismissing beforeunload prompts in approximately version 126 but enabling bidi had no effect on beforeunload prompts until approximately version 133.
Provide a code example showing how to set the unhandled_prompt_behavior option to 'ignore'. This would make the documentation more actionable for users who need to implement this configuration.
-NOTE: ChromeDriver still dismisses prompts unless `options.unhandled_prompt_behavior = 'ignore'` is also specified, in addition to enabling bidi (as recently as version 134 or later).+NOTE: ChromeDriver still dismisses prompts unless `options.unhandled_prompt_behavior = 'ignore'` is also specified, in addition to enabling bidi (as recently as version 134 or later). For example:+```python+from selenium import webdriver+options = webdriver.ChromeOptions()+options.unhandled_prompt_behavior = 'ignore'+driver = webdriver.Chrome(options=options)+```
Apply this suggestion
Suggestion importance[1-10]: 8
__
Why: Adding a concrete code example significantly enhances the documentation by showing users exactly how to implement the described configuration. This transforms abstract instructions into actionable code, making it much easier for users to apply the solution in their own projects.
Medium
Clarify expected behavior
Provide more specific information about what the "old behavior" is, to make it clear what happens when bidi is enabled. This helps users understand exactly what to expect.
-Drivers released in approximately 2024 and later automatically dismiss beforeunload prompts by default. If the old behavior is needed, [enable bidi]({{< ref "../bidi/" >}}).+Drivers released in approximately 2024 and later automatically dismiss beforeunload prompts by default. If the old behavior (where beforeunload prompts are shown to the user) is needed, [enable bidi]({{< ref "../bidi/" >}}).
Apply this suggestion
Suggestion importance[1-10]: 7
__
Why: The suggestion improves clarity by explicitly stating what the "old behavior" means (showing prompts to users). This enhancement makes the documentation more user-friendly and reduces potential confusion about what happens when bidi is enabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Description
Describe testing beforeunload in alerts.en.md
Motivation and Context
I'm working on upgrading the driver used by a test suite and it took me a long time to discover this information.
Related info: https://issues.chromium.org/issues/351858989#comment30
Types of changes
Checklist
I'm willing to sign the CLA but I don't know how.Signed.PR Type
Documentation
Description
Added a new section on
beforeunloadprompt behavior inalerts.en.md.Explained default behavior changes for drivers released in 2024 and later.
Provided specific notes on ChromeDriver versions and configuration requirements.
Changes walkthrough 📝
alerts.en.md
Added documentation for `beforeunload` prompt behaviorwebsite_and_docs/content/documentation/webdriver/interactions/alerts.en.md
beforeunloadprompt behavior.configuration.