Skip to content

Commit c9cba45

Browse files
author
hextraza
committed
Handle case where expected result is not the first elem
1 parent 58ed3a4 commit c9cba45

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,14 @@ private void testOutputFileProcessing() throws Exception
417417

418418
Locator optionLocator = Locator.tagWithText("li", expected);
419419
waitForElement(optionLocator);
420+
WebElement locator = optionLocator.findElement(getDriver());
421+
int locatorIndex = Integer.parseInt(locator.getAttribute("data-option-index"));
422+
423+
for (int i = 0; i <= locatorIndex; i++)
424+
{
425+
searchBox.sendKeys(Keys.ARROW_DOWN);
426+
}
420427

421-
searchBox.sendKeys(Keys.ARROW_DOWN);
422428
searchBox.sendKeys(Keys.ENTER);
423429

424430
waitForElement(searchLocator);

0 commit comments

Comments
 (0)