Skip to content

Commit

Permalink
rename + revert timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
sadym-chromium committed Jan 14, 2025
1 parent c88ea49 commit 2ff3fb2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
7 changes: 4 additions & 3 deletions webdriver/tests/classic/perform_actions/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ def test_key_down_closes_browsing_context(
""")

# Open a new window.
resp = session.execute_script(f"return window.open('{url}')")
new_window_handle = resp.id
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

with pytest.raises(NoSuchWindowException):
key_chain.key_down("w") \
.pause(250 * configuration["timeout_multiplier"]) \
.pause(100 * configuration["timeout_multiplier"]) \
.key_up("w") \
.perform()

Expand Down
6 changes: 3 additions & 3 deletions webdriver/tests/classic/perform_actions/pointer_mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def test_pointer_down_closes_browsing_context(
url = inline("""<input onpointerdown="window.close()">close</input>""")

# Open a new window.
resp = session.execute_script(f"return window.open('{url}')")
new_window_handle = resp.id
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
Expand All @@ -51,7 +51,7 @@ def test_pointer_down_closes_browsing_context(
with pytest.raises(NoSuchWindowException):
mouse_chain.pointer_move(0, 0, origin=origin) \
.pointer_down(button=0) \
.pause(250 * configuration["timeout_multiplier"]) \
.pause(100 * configuration["timeout_multiplier"]) \
.pointer_up(button=0) \
.perform()

Expand Down
6 changes: 3 additions & 3 deletions webdriver/tests/classic/perform_actions/pointer_pen.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def test_pointer_down_closes_browsing_context(
url = inline("""<input onpointerdown="window.close()">close</input>""")

# Open a new window.
resp = session.execute_script(f"return window.open('{url}')")
new_window_handle = resp.id
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
Expand All @@ -48,7 +48,7 @@ def test_pointer_down_closes_browsing_context(
with pytest.raises(NoSuchWindowException):
pen_chain.pointer_move(0, 0, origin=origin) \
.pointer_down(button=0) \
.pause(250 * configuration["timeout_multiplier"]) \
.pause(100 * configuration["timeout_multiplier"]) \
.pointer_up(button=0) \
.perform()

Expand Down
6 changes: 3 additions & 3 deletions webdriver/tests/classic/perform_actions/pointer_touch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def test_pointer_down_closes_browsing_context(
url = inline("""<input onpointerdown="window.close()">close</input>""")

# Open a new window.
resp = session.execute_script(f"return window.open('{url}')")
new_window_handle = resp.id
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
Expand All @@ -47,7 +47,7 @@ def test_pointer_down_closes_browsing_context(
with pytest.raises(NoSuchWindowException):
touch_chain.pointer_move(0, 0, origin=origin) \
.pointer_down(button=0) \
.pause(250 * configuration["timeout_multiplier"]) \
.pause(100 * configuration["timeout_multiplier"]) \
.pointer_up(button=0) \
.perform()

Expand Down

0 comments on commit 2ff3fb2

Please sign in to comment.