@@ -512,7 +512,7 @@ def press_hold_for(self, milliseconds=1000):
512
512
err = None
513
513
while time .time () < start + timeout :
514
514
try :
515
- actions = self .driver .actions ()
515
+ actions = self .testui_driver .actions ()
516
516
actions .w3c_actions .pointer_action .click_and_hold (self .get_element ())
517
517
actions .w3c_actions .pointer_action .pause (milliseconds // 1000 )
518
518
actions .w3c_actions .pointer_action .release ()
@@ -724,33 +724,27 @@ def swipe(
724
724
end_x = location2 .x
725
725
if end_y is None :
726
726
end_y = location2 .y
727
-
728
- actions = self .driver .actions ()
729
- actions .w3c_actions .pointer_action .move_to_location (x = start_x , y = start_y )
730
- actions .w3c_actions .pointer_action .pointer_down ()
731
- if duration :
732
- actions .w3c_actions .pointer_action .pause (duration )
733
- actions .w3c_actions .pointer_action .move_to_location (x = end_x , y = end_y )
734
- actions .w3c_actions .pointer_action .release ()
735
- actions .perform ()
736
727
else :
737
728
if end_x is None :
738
729
end_x = location .x
739
730
if end_y is None :
740
731
end_y = location .y
741
- self .driver .swipe (
742
- start_y = start_y ,
743
- start_x = start_x ,
744
- end_y = end_y ,
745
- end_x = end_x ,
746
- duration = duration ,
747
- )
732
+
733
+ actions = self .testui_driver .actions ()
734
+ actions .w3c_actions .pointer_action .move_to_location (x = start_x , y = start_y )
735
+ actions .w3c_actions .pointer_action .pointer_down ()
736
+ if duration :
737
+ actions .w3c_actions .pointer_action .pause (duration )
738
+ actions .w3c_actions .pointer_action .move_to_location (x = end_x , y = end_y )
739
+ actions .w3c_actions .pointer_action .release ()
740
+ actions .perform ()
748
741
return self
749
742
except Exception as error :
750
743
err = error
751
744
return self .__show_error (
752
- f"{ logger .bcolors .FAIL } { err } { self .device_name } : Element not found "
753
- f'with the following locator: "{ self .locator_type } :{ self .locator } " '
745
+ f"{ logger .bcolors .FAIL } { err } { self .device_name } : Error swiping "
746
+ f'with the following locator: "{ self .locator_type } :{ self .locator } ", '
747
+ f'with the following coordinates "{ start_x } ", "{ start_y } ", "{ end_x } ", "{ end_y } "'
754
748
f"after { time .time () - start } s { logger .bcolors .ENDC } "
755
749
)
756
750
0 commit comments