Skip to content
Snippets Groups Projects
Commit 5dafe9b0 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#658 - adapt selenium tests

parent 27a36c90
No related branches found
No related tags found
No related merge requests found
Pipeline #6078 passed
......@@ -4,7 +4,10 @@ import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
......@@ -89,9 +92,13 @@ public class TransactionTestHelper
public static void selectGlobalAccountByName(WebDriver driver, String accountName)
{
final WebElement globalAccountSelect = driver.findElement(By.cssSelector(".global-account-select-wrapper .custom-select"));
final WebElement globalAccountSelect = driver.findElement(By.id("globalAccountSelect"));
globalAccountSelect.click();
driver.findElements(By.cssSelector(".global-account-select-wrapper .custom-select-item-name")).stream()
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#modalGlobalAccountSelect h4")));
driver.findElements(By.cssSelector(".global-account-select-option-name")).stream()
.filter(webElement -> webElement.getText().equals(accountName))
.findFirst().orElseThrow().click();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment