From 7fdae82e46a700219a6cd897869497c6e4e889c2 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Tue, 28 Nov 2023 12:36:15 +0100 Subject: [PATCH] Browser Steps - Adding validation for "Click X,Y" step --- changedetectionio/blueprint/browser_steps/browser_steps.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changedetectionio/blueprint/browser_steps/browser_steps.py b/changedetectionio/blueprint/browser_steps/browser_steps.py index 88f02c0b..81f7f160 100644 --- a/changedetectionio/blueprint/browser_steps/browser_steps.py +++ b/changedetectionio/blueprint/browser_steps/browser_steps.py @@ -123,6 +123,9 @@ class steppable_browser_interface(): return 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 = int(float(x.strip())) y = int(float(y.strip()))