Skip to content
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

Fix WebAuthnWebdriverTests #16279

Closed

Conversation

Kehrlann
Copy link
Contributor

WebAuthnWebdriverTests.loginWhenAuthenticatorRegisteredThenSuccess was flakey, and failed with StaleElementReferenceException.

This is a race condition between:

  • asynchronously changing the page location through javascript on registration success, using window.location.href
  • asserting that there is a success message displayed, by calling WebElement alert = this.driver.findElement(...) and then calling alert.isDisplayed(), where the alert could reference an element on the page BEFORE the redirect

Fix: ensure the page change is complete before asserting on elements in the page, with an additional assertion.

reviewer: @rwinch

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 13, 2024
@rwinch rwinch self-assigned this Dec 13, 2024
@rwinch rwinch removed the status: waiting-for-triage An issue we've not yet triaged label Dec 13, 2024
@rwinch rwinch changed the base branch from main to 6.4.x December 13, 2024 15:49
@rwinch rwinch changed the base branch from 6.4.x to main December 13, 2024 15:49
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 13, 2024
@rwinch rwinch closed this in fb95406 Dec 13, 2024
@rwinch rwinch added type: bug A general bug type: task A general task in: web An issue in web modules (web, webmvc) and removed status: waiting-for-triage An issue we've not yet triaged type: task A general task labels Dec 13, 2024
@rwinch rwinch added this to the 6.4.2 milestone Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants