Skip to content

Commit

Permalink
TEST: Trying to fix mouse tests on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-voltarelli committed Dec 13, 2024
1 parent df889ec commit 6268d6c
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions tests/test_mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ def test_triple_click_relative(web: WebBot):
web.browse(conftest.INDEX_PAGE)

web.add_image('mouse', os.path.join(conftest.PROJECT_DIR, 'resources', 'mouse.png'))
if not web.find("mouse", matching=0.97, waiting_time=10_000):
if not web.find("mouse", matching=0.97, waiting_time=10_000, x=20, y=30, width=310, height=170):
raise Exception('Image not found: mouse')
web.wait(1000)
web.triple_click_relative(16, 140)

result = conftest.get_event_result('element-result', web)
Expand Down Expand Up @@ -87,9 +86,8 @@ def test_left_click_relative(web: WebBot):
web.browse(conftest.INDEX_PAGE)

web.add_image('mouse', os.path.join(conftest.PROJECT_DIR, 'resources', 'mouse.png'))
if not web.find("mouse", matching=0.97, waiting_time=10_000):
if not web.find("mouse", matching=0.97, waiting_time=10_000, x=20, y=30, width=310, height=170):
raise Exception('Image not found: mouse')
web.wait(1000)
web.click_relative(16, 140)

result = conftest.get_event_result('element-result', web)
Expand All @@ -103,9 +101,8 @@ def test_left_double_click_relative(web: WebBot):
web.browse(conftest.INDEX_PAGE)

web.add_image('mouse', os.path.join(conftest.PROJECT_DIR, 'resources', 'mouse.png'))
if not web.find("mouse", matching=0.97, waiting_time=10_000):
if not web.find("mouse", matching=0.97, waiting_time=10_000, x=20, y=30, width=310, height=170):
raise Exception('Image not found: mouse')
web.wait(1000)
web.double_click_relative(16, 140)

result = conftest.get_event_result('element-result', web)
Expand All @@ -118,9 +115,8 @@ def test_right_click_relative(web: WebBot):
web.browse(conftest.INDEX_PAGE)

web.add_image('mouse', os.path.join(conftest.PROJECT_DIR, 'resources', 'mouse.png'))
if not web.find("mouse", matching=0.97, waiting_time=10_000):
if not web.find("mouse", matching=0.97, waiting_time=10_000, x=20, y=30, width=310, height=170):
raise Exception('Image not found: mouse')
web.wait(1000)
web.right_click_relative(16, 140)

result = conftest.get_event_result('element-result', web)
Expand Down Expand Up @@ -171,9 +167,8 @@ def test_move_relative(web: WebBot):
web.browse(conftest.INDEX_PAGE)

web.add_image('mouse', os.path.join(conftest.PROJECT_DIR, 'resources', 'mouse.png'))
if not web.find("mouse", matching=0.97, waiting_time=10_000):
if not web.find("mouse", matching=0.97, waiting_time=10_000, x=20, y=30, width=310, height=170):
raise Exception('Image not found: mouse')
web.wait(1000)
web.move()
web.move_relative(16, 140)

Expand Down

0 comments on commit 6268d6c

Please sign in to comment.