Skip to content

Commit

Permalink
Extend modal close wait with custom timeout
Browse files Browse the repository at this point in the history
Enhanced flexibility in `wait_until_modal_is_closed` method by adding an optional timeout parameter. This allows custom waiting periods for slower environments or particularly time-consuming operations, improving test reliability. Default timeout remains unchanged at 15 seconds.
  • Loading branch information
leboff committed May 10, 2024
1 parent 31f2873 commit d6a7306
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cumulusci/robotframework/Salesforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,10 @@ def wait_until_modal_is_open(self):
)

@capture_screenshot_on_error
def wait_until_modal_is_closed(self):
def wait_until_modal_is_closed(self, timeout=15):
"""Wait for modal to close"""
self.selenium.wait_until_page_does_not_contain_element(
lex_locators["modal"]["is_open"], timeout=15
lex_locators["modal"]["is_open"], timeout
)

@capture_screenshot_on_error
Expand Down

0 comments on commit d6a7306

Please sign in to comment.