Skip to content

Commit

Permalink
Added waits to cater for the time the results take to appear
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo committed Oct 15, 2023
1 parent 2e38f73 commit b18826c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/test/java/starter/actions/SearchSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import java.util.List;

import static org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated;

public class SearchSteps extends UIInteractionSteps {

SearchForm searchForm;
Expand All @@ -16,6 +18,7 @@ public class SearchSteps extends UIInteractionSteps {
public void searchForTerm(String searchTerm) {
find(SearchForm.SEARCH_FIELD).sendKeys(searchTerm);
find(SearchForm.SEARCH_BUTTON).click();
waitFor(presenceOfElementLocated(SearchForm.ARTICLE_HEADINGS));
}

@Step("Check the search results")
Expand Down

0 comments on commit b18826c

Please sign in to comment.