@@ -879,10 +879,8 @@ def click(
879
879
"""
880
880
x , y = self .state .center ()
881
881
882
- mouse_button = mouse_map .get (button , "left" )
883
-
884
882
_mouse_click (
885
- self ._mouse_controller , x , y , clicks , interval_between_clicks , mouse_button
883
+ self ._mouse_controller , x , y , clicks , interval_between_clicks , button
886
884
)
887
885
self .sleep (wait_after )
888
886
@@ -911,10 +909,8 @@ def click_relative(
911
909
x = self .state .x () + x
912
910
y = self .state .y () + y
913
911
914
- mouse_button = mouse_map .get (button , "left" )
915
-
916
912
_mouse_click (
917
- self ._mouse_controller , x , y , clicks , interval_between_clicks , mouse_button
913
+ self ._mouse_controller , x , y , clicks , interval_between_clicks , button
918
914
)
919
915
self .sleep (wait_after )
920
916
@@ -1003,9 +999,8 @@ def mouse_down(
1003
999
wait_after (int, optional): Interval to wait after clicking on the element.
1004
1000
button (str, optional): One of 'left', 'right', 'middle'. Defaults to 'left'
1005
1001
"""
1006
- mouse_button = mouse_map .get (button , "left" )
1007
1002
1008
- self ._mouse_controller .press (mouse_button )
1003
+ self ._mouse_controller .press (button )
1009
1004
self .sleep (wait_after )
1010
1005
1011
1006
def mouse_up (
@@ -1021,9 +1016,8 @@ def mouse_up(
1021
1016
wait_after (int, optional): Interval to wait after clicking on the element.
1022
1017
button (str, optional): One of 'left', 'right', 'middle'. Defaults to 'left'
1023
1018
"""
1024
- mouse_button = mouse_map .get (button , "left" )
1025
1019
1026
- self ._mouse_controller .release (mouse_button )
1020
+ self ._mouse_controller .release (button )
1027
1021
self .sleep (wait_after )
1028
1022
1029
1023
def scroll_down (self , clicks : int ) -> None :
0 commit comments