While redirecting from one page to another, a redirection page appears for 1-2 secs. How do I verify that redirection page? I tried to check for some element on that page and pause but that was not working.
Any suggestions?
With Selenium Explicit waits
driver.findElement(By.id("redirect")).click();//click on some link which will get to to your page
WebElement element = (new WebDriverWait(driver, 10))
.until(ExpectedConditions.presenceOfElementLocated(By.id("someElementOnTheRedirectionPage")));
//now you can assert elements atrributes
//now you are on the desired page after redirection
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.