Skip to content

Handle behavior change in WebElement.isDisplayed#2895

Open
labkey-tchad wants to merge 5 commits intodevelopfrom
fb_selenium4.41.0
Open

Handle behavior change in WebElement.isDisplayed#2895
labkey-tchad wants to merge 5 commits intodevelopfrom
fb_selenium4.41.0

Conversation

@labkey-tchad
Copy link
Member

Rationale

Starting with Selenium 4.39.0, WebElement.isDisplayed is returning false for elements that are scrolled out of view while a modal dialog is preventing scrolling.

org.openqa.selenium.TimeoutException: Grid still loading <30.000s>
Build info: version: '4.40.0', revision: 'b3333f1'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1007-aws', java.version: '25.0.2'
Driver info: driver.version: unknown
  at app//org.labkey.test.util.Timer.waitFor(Timer.java:105)
  at app//org.labkey.test.util.Timer.waitFor(Timer.java:112)
  at app//org.labkey.test.WebDriverWrapper.waitFor(WebDriverWrapper.java:2386)
  at app//org.labkey.test.components.ui.grids.ResponsiveGrid.waitForLoaded(ResponsiveGrid.java:87)
  at app//org.labkey.test.components.ui.grids.ResponsiveGrid.doAndWaitForUpdate(ResponsiveGrid.java:93)
  at app//org.labkey.test.components.ui.grids.QueryGrid.doAndWaitForUpdate(QueryGrid.java:224)
  at app//org.labkey.test.components.inventory.freezer.FMCheckOutSampleDialog.clickCheckOutSample(FMCheckOutSampleDialog.java:150)
  at app//org.labkey.test.components.inventory.freezer.FMCheckOutSampleDialog.clickCheckOutSample(FMCheckOutSampleDialog.java:144)
  at app//org.labkey.test.tests.biologics.timeline.BiologicsSampleTimelineTest.testStorageTimelineEvents(BiologicsSampleTimelineTest.java:409)

The JavaScript checkVisibility method is a decent fallback. Using it more widely might have unexpected side-effects, so I'm just using it where this change is causing trouble (ResponsiveGrid.waitForLoaded).

Related Pull Requests

  • N/A

Changes

  • Handle behavior change in WebElement.isDisplayed
  • Centralize JavascriptExecutor customization
  • Upgrade Selenium to 4.41.0

@labkey-tchad
Copy link
Member Author

@labkey-tchad labkey-tchad self-assigned this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant