diff --git a/apps/SeleniumService/selenium_claimSubmitWorker.py b/apps/SeleniumService/selenium_claimSubmitWorker.py index 40bef341..77739826 100755 --- a/apps/SeleniumService/selenium_claimSubmitWorker.py +++ b/apps/SeleniumService/selenium_claimSubmitWorker.py @@ -694,7 +694,7 @@ class AutomationMassHealthClaimsLogin: print("DEBUG: Clicking plus button to add new service line") # Step 1: Wait a moment to ensure the previous service line is fully processed - time.sleep(3) + time.sleep(1) # Step 2: Try multiple approaches to find the plus button plus_button = None @@ -768,11 +768,11 @@ class AutomationMassHealthClaimsLogin: print(f"DEBUG: JavaScript approach failed: {e}") raise Exception("Could not find plus button with any method") - time.sleep(1) - + time.sleep(0.5) + # Step 3: Scroll into view self.driver.execute_script("arguments[0].scrollIntoView(true);", plus_button) - time.sleep(1) + time.sleep(0.5) # Step 4: Check if button is enabled is_disabled = plus_button.get_attribute("disabled") @@ -804,8 +804,8 @@ class AutomationMassHealthClaimsLogin: actions = ActionChains(self.driver) actions.move_to_element(plus_button).click().perform() - time.sleep(2) # Wait for new row to be created - + time.sleep(1) # Wait for new row to be created + print("DEBUG: Successfully clicked plus button") return "Success" except Exception as e: