Best Answer · By JanBask QA Expert
Ashish Mishra JanBask Expert
Answered on Jan 14, 2020
In Selenium, you can utilize the underneath lines of code to check for the fruitful stacking of a site page. The best methodology is by choosing a component from the page and holding on until it gets interactive.
selenium.waitForPageToLoad("5000");
// Or
while (!(selenium.isElementPresent("any page element ")==true)) {
selenium.setSpeed("5");
Thread.sleep(5);
}
The following is the Webdriver explicit code to accomplish a similar goal.
WebDriverWait check = new WebDriverWait(driver, 100);
check.until(ExpectedConditions.anyElement(By.id(id)));