-
Notifications
You must be signed in to change notification settings - Fork 155
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
[tests-only] [full-ci] try-catch and retry possible cause of stale-dom #5834
Conversation
Results for oC10SharingInternalGroupsSharingIndicator https://drone.owncloud.com/owncloud/web/19212/24/1
|
Results for oCISSharingInternalUsers1 https://drone.owncloud.com/owncloud/web/19212/55/1
|
resourceRowXpath = this.getFileRowSelectorByFileName(fileName) | ||
shareIndicatorsXpath = resourceRowXpath + this.elements.shareIndicatorsInFileRow.selector |
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.
the value of these variables does not seems to be different from the initial value. Why do you need to update it here?
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.
During await this.waitForElementVisible({
line error is thrown StaleElementReferenceException
. So I put that code inside try-catch and retry it.
console.log(error) | ||
console.log('\n Retrying with new reference \n') |
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.
leftovers?
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.
these console logs may be helpful for debugging.
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.
maybe the error does not need to be logged but IMO the retrying info is good.
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.
expect the existing comment...rest looks good to me 👍🏼
bab0855
to
0334bc4
Compare
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.
Please don't merge this without feedback from the web team :)
Kudos, SonarCloud Quality Gate passed! |
Results for oC10SharingPublicManagement https://drone.owncloud.com/owncloud/web/19226/34/1
|
Results for oC10SharingExternalRoot https://drone.owncloud.com/owncloud/web/19226/40/1
|
try { | ||
await this.waitForElementVisible({ | ||
selector: shareIndicatorsXpath, | ||
locateStrategy: this.elements.shareIndicatorsInFileRow.locateStrategy, | ||
abortOnFailure: false, | ||
timeout: sharingIndicatorExpectedToBeVisible | ||
? waitForConditionTimeout | ||
: waitForNegativeConditionTimeout, | ||
pollInterval: waitForConditionPollInterval | ||
}) | ||
} catch (error) { | ||
console.log('\n Retrying with new reference \n') | ||
resourceRowXpath = this.getFileRowSelectorByFileName(fileName) | ||
shareIndicatorsXpath = resourceRowXpath + this.elements.shareIndicatorsInFileRow.selector | ||
await this.waitForFileVisible(fileName) | ||
} |
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.
I am not sure we should do that. And also the error is thrown by
508: this.api.elementIdAttribute(element.ELEMENT, 'data-test-indicator-type', attr => {
what I suspect is, the DOM is refreshed due to the preview of the file causing the element reference to change.
so I suggest is to use @disablePreviews
tag in webUISharingInternalUsersSharingIndicator/shareWithUsers.feature
file
Closing this because the fixes are made in PR #5852 |
Description
Flaky test while trying to check the share indicator of a file inside shard folder.
Gives error:
Error while running .isElementDisplayed() protocol action: The command failed because the referenced element is no longer attached to the DOM. – stale element reference:
There seems to be no any reload after file upload inside a shared folder. Possible cause of stale reference was not found.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: