-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add retry when StaleElementReferenceException is raised for Submariner installation #10168
Conversation
ocs_ci/ocs/acm/acm.py
Outdated
log.info("Click on 'Install Submariner add-ons' button") | ||
except StaleElementReferenceException: | ||
if attempt == retries - 1: | ||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to make a screenshot in case of this exception and/or log the locator of the stale element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
New changes are detected. LGTM label has been removed. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: am-agrawa The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: am-agrawa The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: am-agrawa <[email protected]>
Signed-off-by: am-agrawa <[email protected]>
Signed-off-by: am-agrawa <[email protected]>
Signed-off-by: am-agrawa <[email protected]>
Signed-off-by: am-agrawa <[email protected]>
…ute 'find_element' Signed-off-by: am-agrawa <[email protected]>
Signed-off-by: am-agrawa <[email protected]>
Signed-off-by: am-agrawa <[email protected]>
Signed-off-by: am-agrawa <[email protected]>
Signed-off-by: am-agrawa <[email protected]>
Signed-off-by: am-agrawa <[email protected]>
ocs_ci/ocs/acm/acm.py
Outdated
retries = 6 | ||
for attempt in range(retries): | ||
try: | ||
WebDriverWait(self, 10).until( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you need to pass self.driver, but not self to constructor of WebDriverWait
Signed-off-by: am-agrawa <[email protected]>
@@ -234,7 +240,9 @@ def install_submariner_ui(self, globalnet=True): | |||
log.info("Click on 'Submariner add-ons' tab") | |||
self.do_click(self.page_nav["submariner-tab"]) | |||
log.info("Click on 'Install Submariner add-ons' button") | |||
self.do_click(self.page_nav["install-submariner-btn"], timeout=120) | |||
retry((StaleElementReferenceException, TimeoutException), retries=5, delay=10)( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you haven't tested it yet, pls consider the first option we discussed, it refreshes the page in between retries.
self.do_click(
self.page_nav["install-submariner-btn"], enable_screenshot=True, avoid_stale=True
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in #9646
Fixed as part of pr##9646 |
fixes #9622