Skip to content

Wait for active report panel to prevent NPEs#999

Merged
labkey-tchad merged 1 commit intorelease25.3-SNAPSHOTfrom
25.3_fb_waitForActiveReportPanel
Aug 4, 2025
Merged

Wait for active report panel to prevent NPEs#999
labkey-tchad merged 1 commit intorelease25.3-SNAPSHOTfrom
25.3_fb_waitForActiveReportPanel

Conversation

@labkey-tchad
Copy link
Member

Rationale

Nothing ever expects ParticipantViewPage. getActiveReportPanel to return null. Using findElementOrNull just leads to occasional NPEs. We should just wait for the panel.

java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.SearchContext.findElements(org.openqa.selenium.By)" because "context" is null
  at org.labkey.test.Locator$XPathLocator.findElements(Locator.java:1569)
  at org.labkey.test.Locator.findOptionalElement(Locator.java:387)
  [...]
  at org.labkey.test.components.Component$ComponentFinder.findElement(Component.java:180)
  at org.labkey.test.components.Component$ComponentFinder.find(Component.java:206)
  at org.labkey.test.pages.ehr.ParticipantViewPage.getActiveReportDataRegion(ParticipantViewPage.java:123)
  at org.labkey.test.tests.jhu_ehr.JHU_EHRTest.testRecordBulkMedications(JHU_EHRTest.java:1726)

Related Pull Requests

  • N/A

Changes

  • Wait for active report panel to prevent NPEs

@labkey-tchad labkey-tchad requested review from a team and labkey-chrisj and removed request for a team August 4, 2025 15:54
@labkey-tchad labkey-tchad merged commit e0d7e79 into release25.3-SNAPSHOT Aug 4, 2025
7 of 9 checks passed
@labkey-tchad labkey-tchad deleted the 25.3_fb_waitForActiveReportPanel branch August 4, 2025 18:44
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.

2 participants