Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eskimo committed Mar 27, 2023
1 parent 9316bb7 commit c4104d1
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,17 @@ public void testNominal() {
public void testDownloadFile() {
js("eskimoFileManagers.downloadFile('192.168.10.11', '192-168-10-11', '/etc', 'passwd')");
String originalWindow = driver.getWindowHandle();
for (String windowHandle : driver.getWindowHandles()) {
if(!originalWindow.contentEquals(windowHandle)) {
driver.switchTo().window(windowHandle);
break;
try {
for (String windowHandle : driver.getWindowHandles()) {
if (!originalWindow.contentEquals(windowHandle)) {
driver.switchTo().window(windowHandle);
break;
}
}
assertEquals("http://localhost:9001/src/test/resources/file-manager-download/passwd?nodeAddress=192.168.10.11&folder=/etc&file=passwd", driver.getCurrentUrl());
} finally {
driver.switchTo().window(originalWindow);
}
assertEquals ("http://localhost:9001/src/test/resources/file-manager-download/passwd?nodeAddress=192.168.10.11&folder=/etc&file=passwd", driver.getCurrentUrl());
}

@Test
Expand Down

0 comments on commit c4104d1

Please sign in to comment.