Skip to content

Commit 057bebe

Browse files
authored
Improve element wait handling in JBrowseTestHelper
Replaced sleep with explicit wait for element to be clickable.
1 parent a6d8dfb commit 057bebe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jbrowse/test/src/org/labkey/test/tests/external/labModules/JBrowseTestHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import org.openqa.selenium.Point;
1717
import org.openqa.selenium.StaleElementReferenceException;
1818
import org.openqa.selenium.WebElement;
19+
import org.openqa.selenium.support.ui.ExpectedConditions;
1920

2021
import java.io.File;
2122
import java.util.stream.Collector;
@@ -149,7 +150,8 @@ public static By getVariantWithinTrack(BaseWebDriverTest test, String trackId, S
149150
}
150151

151152
test.waitForElement(l);
152-
WebDriverWrapper.sleep(100); // This allows a short window for rendering prior to clicking variants
153+
WebElement el = test.waitForElement(l);
154+
test.shortWait().until(ExpectedConditions.elementToBeClickable(el));
153155

154156
return By.xpath(l.toXpath());
155157
}

0 commit comments

Comments
 (0)