We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 079033f + 1242e57 commit 389c9b3Copy full SHA for 389c9b3
botcity/web/bot.py
@@ -1100,7 +1100,6 @@ def leave_iframe(self):
1100
#######
1101
# Mouse
1102
1103
- @only_if_element
1104
def click_on(self, label):
1105
"""
1106
Click on the element.
@@ -1109,7 +1108,9 @@ def click_on(self, label):
1109
1108
label (str): The image identifier
1110
1111
x, y = self.get_element_coords_centered(label)
1112
- self.click(x, y)
+ if None in (x, y):
+ raise ValueError(f'Element not available. Cannot find {label}.')
1113
+ self.click_at(x, y)
1114
1115
@only_if_element
1116
def get_last_x(self):
0 commit comments