Skip to content

Commit f49c615

Browse files
committed
[py] Ensure test is reliable in the RBE
1 parent 7cba9cf commit f49c615

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

py/test/selenium/webdriver/common/w3c_interaction_tests.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,18 @@ def test_dragging_element_with_mouse_fires_events(driver, pages):
178178
@pytest.mark.xfail_remote
179179
def test_pen_pointer_properties(driver, pages):
180180
pages.load("pointerActionsPage.html")
181-
pointerArea = driver.find_element(By.CSS_SELECTOR, "#pointerArea")
181+
182182
pointer_input = PointerInput(interaction.POINTER_PEN, "pen")
183+
184+
# Make sure the pointer starts in a known location
185+
reset_actions = ActionBuilder(driver, mouse=pointer_input)
186+
reset_actions.pointer_action.move_to_location(x=0, y=0)
187+
reset_actions.perform()
188+
# Clear the events state
189+
driver.execute_script("allEvents.events = [];")
190+
191+
pointerArea = driver.find_element(By.CSS_SELECTOR, "#pointerArea")
192+
183193
actions = ActionBuilder(driver, mouse=pointer_input)
184194
center = _get_inview_center(pointerArea.rect, _get_viewport_rect(driver))
185195
actions.pointer_action.move_to(pointerArea).pointer_down(pressure=0.36, tilt_x=-72, tilt_y=9, twist=86).move_to(

0 commit comments

Comments
 (0)