Skip to content

Commit 1242e57

Browse files
committed
FIX: avoiding None values
1 parent 6807489 commit 1242e57

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

botcity/web/bot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,8 @@ def click_on(self, label):
11081108
label (str): The image identifier
11091109
"""
11101110
x, y = self.get_element_coords_centered(label)
1111+
if None in (x, y):
1112+
raise ValueError(f'Element not available. Cannot find {label}.')
11111113
self.click_at(x, y)
11121114

11131115
@only_if_element

0 commit comments

Comments
 (0)