From b683260ea1b2b5ce8fb7f86d222ce50ac7e28f06 Mon Sep 17 00:00:00 2001 From: Vishnu Date: Thu, 12 Jun 2025 18:25:55 +0530 Subject: [PATCH] toothsuface fixed --- apps/SeleniumService/selenium_worker.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/SeleniumService/selenium_worker.py b/apps/SeleniumService/selenium_worker.py index e4fed44..021029b 100644 --- a/apps/SeleniumService/selenium_worker.py +++ b/apps/SeleniumService/selenium_worker.py @@ -180,11 +180,13 @@ class AutomationMassHealth: # Fill Tooth Surface if present if proc.get("toothSurface"): - surface = proc["toothSurface"] - checkbox_xpath = f"//input[@type='checkbox' and @name='TS_{surface}']" - checkbox = wait.until(EC.element_to_be_clickable((By.XPATH, checkbox_xpath))) - if not checkbox.is_selected(): - checkbox.click() + surfaces = proc["toothSurface"].split(",") + for surface in surfaces: + surface = surface.strip() + checkbox_xpath = f"//input[@type='checkbox' and @name='TS_{surface}']" + checkbox = wait.until(EC.element_to_be_clickable((By.XPATH, checkbox_xpath))) + if not checkbox.is_selected(): + checkbox.click() # Fill Fees if present