Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion manifests/key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ address_bar_and_search:
mac: pass
win: unstable
splits:
- functional1
- functional1
test_close_browser_when_downloading_private_session:
result: pass
splits:
- functional1
test_clipboard_pref_flip:
result: unstable
splits:
Expand Down
10 changes: 10 additions & 0 deletions modules/browser_object_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,16 @@ def _download_complete(_):
self.wait.until(_download_complete)
return self

@BasePage.context_chrome
def attempt_close_window(self):
"""
Focus the window header/tab strip first, then attempt to close the window.
This makes the close prompt deterministic in situations like downloads-in-progress.
"""

self.get_element("tab-strip").click()
self.get_element("window-close-button").click()

@BasePage.context_chrome
def refresh_page(self) -> BasePage:
"""
Expand Down
Loading
Loading