A dog grooming website recently added a search function to their website.
One of their Selenium tests for the search functionality begins like this:
WebDriver driver = new ChromeDriver(chromeOptions); driver.manage().timeouts().implicitlyWait(5, java.util.concurrent.TimeUnit.SECONDS); driver.get(dogGroomingURL); WebElement searchBox = driver.findElement(By.cssSelector(".searchbox")); searchBox.sendKeys("paw grooming"); WebElement searchButton = driver.findElement(By.id("searchButton")); searchButton.click(); WebElement searchResults = driver.findElement(By.id("searchResults")); String text = searchResults.getText();
What can be concluded about the test?
(Select all acceptable answers.)
If the searchBox takes 6 seconds to show up on the website, the WebDriver will throw an exception.
If the searchButton takes 4 seconds to show up on the website, the WebDriver will throw an exception.
The searchBox is a DOM element which has the searchbox CSS class.
The searchButton is a DOM element which has the searchButton name property.
The call to searchBox.sendKeys will block until those keys are entered.
If searchResults is not present in the HTML page immediately after clicking searchButton, WebDriver will throw an exception.