@@ -28,7 +28,7 @@ class TestMultiAction(BaseTestCase):
2828 def test_parallel_actions (self ) -> None :
2929 self ._move_to_splitting_touches_accros_views ()
3030
31- els = self .driver .find_elements_by_class_name ( 'android.widget.ListView' )
31+ els = self .driver .find_elements ( by = AppiumBy . CLASS_NAME , value = 'android.widget.ListView' )
3232 a1 = TouchAction ()
3333 a1 .press (els [0 ]).move_to (x = 10 , y = 0 ).move_to (x = 10 , y = - 75 ).move_to (x = 10 , y = - 600 ).release ()
3434
@@ -42,7 +42,7 @@ def test_parallel_actions(self) -> None:
4242 def test_actions_with_waits (self ) -> None :
4343 self ._move_to_splitting_touches_accros_views ()
4444
45- els = self .driver .find_elements_by_class_name ( 'android.widget.ListView' )
45+ els = self .driver .find_elements ( by = AppiumBy . CLASS_NAME , value = 'android.widget.ListView' )
4646 a1 = TouchAction ()
4747 a1 .press (els [0 ]).move_to (x = 10 , y = 0 ).move_to (x = 10 , y = - 75 ).wait (1000 ).move_to (x = 10 , y = - 600 ).release ()
4848
@@ -54,40 +54,40 @@ def test_actions_with_waits(self) -> None:
5454 ma .perform ()
5555
5656 def _move_to_splitting_touches_accros_views (self ) -> None :
57- el1 = self .driver .find_element_by_accessibility_id ( 'Content' )
58- el2 = self .driver .find_element_by_accessibility_id ( 'Animation' )
57+ el1 = self .driver .find_element ( by = AppiumBy . ACCESSIBILITY_ID , value = 'Content' )
58+ el2 = self .driver .find_element ( by = AppiumBy . ACCESSIBILITY_ID , value = 'Animation' )
5959 self .driver .scroll (el1 , el2 )
6060
61- el = self .driver .find_element_by_accessibility_id ( 'Views' )
61+ el = self .driver .find_element ( by = AppiumBy . ACCESSIBILITY_ID , value = 'Views' )
6262 action = TouchAction (self .driver )
6363 action .tap (el ).perform ()
6464
6565 # simulate a swipe/scroll
6666 el = wait_for_element (self .driver , AppiumBy .ACCESSIBILITY_ID , 'Expandable Lists' )
6767 action .press (el ).move_to (x = 100 , y = - 1000 ).release ().perform ()
68- el = self .driver .find_element_by_accessibility_id ( 'Layouts' )
68+ el = self .driver .find_element ( by = AppiumBy . ACCESSIBILITY_ID , value = 'Layouts' )
6969 action .press (el ).move_to (x = 100 , y = - 1000 ).release ().perform ()
7070
71- el = self .driver .find_element_by_accessibility_id ( 'Splitting Touches across Views' )
71+ el = self .driver .find_element ( by = AppiumBy . ACCESSIBILITY_ID , value = 'Splitting Touches across Views' )
7272 action .tap (el ).perform ()
7373
7474 wait_for_element (self .driver , AppiumBy .ID , 'io.appium.android.apis:id/list1' )
7575
7676 @pytest .mark .skipif (condition = is_ci (), reason = 'Skip since the test must be watched to check if it works' )
7777 def test_driver_multi_tap (self ) -> None :
78- el = self .driver .find_element_by_accessibility_id ( 'Graphics' )
78+ el = self .driver .find_element ( by = AppiumBy . ACCESSIBILITY_ID , value = 'Graphics' )
7979 action = TouchAction (self .driver )
8080 action .tap (el ).perform ()
8181
8282 wait_for_element (self .driver , AppiumBy .CLASS_NAME , 'android.widget.TextView' )
83- els = self .driver .find_elements_by_class_name ( 'android.widget.TextView' )
83+ els = self .driver .find_elements ( by = AppiumBy . CLASS_NAME , value = 'android.widget.TextView' )
8484 self .driver .scroll (els [len (els ) - 1 ], els [0 ])
8585
86- els = self .driver .find_elements_by_class_name ( 'android.widget.TextView' )
86+ els = self .driver .find_elements ( by = AppiumBy . CLASS_NAME , value = 'android.widget.TextView' )
8787 if els [len (els ) - 1 ].get_attribute ('name' ) != 'Xfermodes' :
8888 self .driver .scroll (els [len (els ) - 1 ], els [0 ])
8989
90- el = self .driver .find_element_by_accessibility_id ( 'Touch Paint' )
90+ el = self .driver .find_element ( by = AppiumBy . ACCESSIBILITY_ID , value = 'Touch Paint' )
9191 action .tap (el ).perform ()
9292
9393 positions = [(100 , 200 ), (100 , 400 )]
0 commit comments