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

stabilized selenium test: wait after pressing tab

parent 01f5f360
No related branches found
No related tags found
No related merge requests found
Pipeline #4956 failed
......@@ -98,11 +98,15 @@ public class CategorySelectTest
// navigate to category select with tab traversal
driver.findElement(By.tagName("body")).sendKeys(Keys.TAB);
WebDriverWait wait = new WebDriverWait(driver, 5);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("label[for=transaction-amount].active")));
driver.findElement(By.tagName("body")).sendKeys(Keys.TAB);
wait.until(ExpectedConditions.invisibilityOfElementLocated(By.cssSelector("label[for=transaction-amount].active")));
// open category select
driver.findElement(By.tagName("body")).sendKeys(Keys.ENTER);
WebDriverWait wait = new WebDriverWait(driver, 5);
wait = new WebDriverWait(driver, 5);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".category-select-wrapper .custom-select-option.selected")));
// assert
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment