Skip to content

Commit

Permalink
inline new_window_handle
Browse files Browse the repository at this point in the history
  • Loading branch information
sadym-chromium committed Jan 15, 2025
1 parent 2ff3fb2 commit 6860a93
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
4 changes: 1 addition & 3 deletions webdriver/tests/classic/perform_actions/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ def test_key_down_closes_browsing_context(
# Open a new window.
new_window = session.execute_script(f"return window.open('{url}')")

new_window_handle = new_window.id

# Switch to the new window.
session.window_handle = new_window_handle
session.window_handle = new_window.id

with pytest.raises(NoSuchWindowException):
key_chain.key_down("w") \
Expand Down
3 changes: 1 addition & 2 deletions webdriver/tests/classic/perform_actions/pointer_mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ def test_pointer_down_closes_browsing_context(

# Open a new window.
new_window = session.execute_script(f"return window.open('{url}')")
new_window_handle = new_window.id

# Switch to the new window.
session.window_handle = new_window_handle
session.window_handle = new_window.id

# Get the input element.
origin = session.find.css("input", all=False)
Expand Down
3 changes: 1 addition & 2 deletions webdriver/tests/classic/perform_actions/pointer_pen.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ def test_pointer_down_closes_browsing_context(

# Open a new window.
new_window = session.execute_script(f"return window.open('{url}')")
new_window_handle = new_window.id

# Switch to the new window.
session.window_handle = new_window_handle
session.window_handle = new_window.id

# Get the input element.
origin = session.find.css("input", all=False)
Expand Down
3 changes: 1 addition & 2 deletions webdriver/tests/classic/perform_actions/pointer_touch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ def test_pointer_down_closes_browsing_context(

# Open a new window.
new_window = session.execute_script(f"return window.open('{url}')")
new_window_handle = new_window.id

# Switch to the new window.
session.window_handle = new_window_handle
session.window_handle = new_window.id

# Get the input element.
origin = session.find.css("input", all=False)
Expand Down

0 comments on commit 6860a93

Please sign in to comment.