mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-12 11:05:42 +00:00
Browser Steps - Adding validation for "Click X,Y" step
This commit is contained in:
@@ -123,6 +123,9 @@ class steppable_browser_interface():
|
|||||||
return
|
return
|
||||||
|
|
||||||
def action_click_x_y(self, selector, value):
|
def action_click_x_y(self, selector, value):
|
||||||
|
if not re.match(r'^\s?\d+\s?,\s?\d+\s?$', value):
|
||||||
|
raise Exception("'Click X,Y' step should be in the format of '100 , 90'")
|
||||||
|
|
||||||
x, y = value.strip().split(',')
|
x, y = value.strip().split(',')
|
||||||
x = int(float(x.strip()))
|
x = int(float(x.strip()))
|
||||||
y = int(float(y.strip()))
|
y = int(float(y.strip()))
|
||||||
|
|||||||
Reference in New Issue
Block a user