@@ -48,9 +48,8 @@ def test_triple_click_relative(web: WebBot):
4848 web .browse (conftest .INDEX_PAGE )
4949
5050 web .add_image ('mouse' , os .path .join (conftest .PROJECT_DIR , 'resources' , 'mouse.png' ))
51- if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 ):
51+ if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 , x = 20 , y = 30 , width = 310 , height = 170 ):
5252 raise Exception ('Image not found: mouse' )
53- web .wait (1000 )
5453 web .triple_click_relative (16 , 140 )
5554
5655 result = conftest .get_event_result ('element-result' , web )
@@ -87,9 +86,8 @@ def test_left_click_relative(web: WebBot):
8786 web .browse (conftest .INDEX_PAGE )
8887
8988 web .add_image ('mouse' , os .path .join (conftest .PROJECT_DIR , 'resources' , 'mouse.png' ))
90- if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 ):
89+ if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 , x = 20 , y = 30 , width = 310 , height = 170 ):
9190 raise Exception ('Image not found: mouse' )
92- web .wait (1000 )
9391 web .click_relative (16 , 140 )
9492
9593 result = conftest .get_event_result ('element-result' , web )
@@ -103,9 +101,8 @@ def test_left_double_click_relative(web: WebBot):
103101 web .browse (conftest .INDEX_PAGE )
104102
105103 web .add_image ('mouse' , os .path .join (conftest .PROJECT_DIR , 'resources' , 'mouse.png' ))
106- if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 ):
104+ if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 , x = 20 , y = 30 , width = 310 , height = 170 ):
107105 raise Exception ('Image not found: mouse' )
108- web .wait (1000 )
109106 web .double_click_relative (16 , 140 )
110107
111108 result = conftest .get_event_result ('element-result' , web )
@@ -118,9 +115,8 @@ def test_right_click_relative(web: WebBot):
118115 web .browse (conftest .INDEX_PAGE )
119116
120117 web .add_image ('mouse' , os .path .join (conftest .PROJECT_DIR , 'resources' , 'mouse.png' ))
121- if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 ):
118+ if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 , x = 20 , y = 30 , width = 310 , height = 170 ):
122119 raise Exception ('Image not found: mouse' )
123- web .wait (1000 )
124120 web .right_click_relative (16 , 140 )
125121
126122 result = conftest .get_event_result ('element-result' , web )
@@ -171,9 +167,8 @@ def test_move_relative(web: WebBot):
171167 web .browse (conftest .INDEX_PAGE )
172168
173169 web .add_image ('mouse' , os .path .join (conftest .PROJECT_DIR , 'resources' , 'mouse.png' ))
174- if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 ):
170+ if not web .find ("mouse" , matching = 0.97 , waiting_time = 10_000 , x = 20 , y = 30 , width = 310 , height = 170 ):
175171 raise Exception ('Image not found: mouse' )
176- web .wait (1000 )
177172 web .move ()
178173 web .move_relative (16 , 140 )
179174
0 commit comments