@@ -1674,6 +1674,11 @@ def __gui_click_x_y(self, x, y, timeframe=0.25, uc_lock=False):
16741674 import pyautogui
16751675 pyautogui = self .__get_configured_pyautogui (pyautogui )
16761676 screen_width , screen_height = pyautogui .size ()
1677+ if (
1678+ hasattr (sb_config , "_cdp_browser" )
1679+ and sb_config ._cdp_browser == "opera"
1680+ ):
1681+ x = x + 55
16771682 if x < 0 or y < 0 or x > screen_width or y > screen_height :
16781683 raise Exception (
16791684 "PyAutoGUI cannot click on point (%s, %s)"
@@ -1931,6 +1936,12 @@ def __gui_drag_drop(self, x1, y1, x2, y2, timeframe=0.25, uc_lock=False):
19311936 import pyautogui
19321937 pyautogui = self .__get_configured_pyautogui (pyautogui )
19331938 screen_width , screen_height = pyautogui .size ()
1939+ if (
1940+ hasattr (sb_config , "_cdp_browser" )
1941+ and sb_config ._cdp_browser == "opera"
1942+ ):
1943+ x1 = x1 + 55
1944+ x2 = x2 + 55
19341945 if x1 < 0 or y1 < 0 or x1 > screen_width or y1 > screen_height :
19351946 raise Exception (
19361947 "PyAutoGUI cannot drag-drop from point (%s, %s)"
@@ -2022,6 +2033,11 @@ def __gui_hover_x_y(self, x, y, timeframe=0.25, uc_lock=False):
20222033 import pyautogui
20232034 pyautogui = self .__get_configured_pyautogui (pyautogui )
20242035 screen_width , screen_height = pyautogui .size ()
2036+ if (
2037+ hasattr (sb_config , "_cdp_browser" )
2038+ and sb_config ._cdp_browser == "opera"
2039+ ):
2040+ x = x + 55
20252041 if x < 0 or y < 0 or x > screen_width or y > screen_height :
20262042 raise Exception (
20272043 "PyAutoGUI cannot hover on point (%s, %s)"
0 commit comments