The solution is using Implicit Wait which will solve your problems of page load
Here is an example: on opening a web page, some element on the page are not visible and you have to wait for it, in this case, use the below code:
WebDriverWait waitForElement = new WebDriverWait(driver, 15);
WebElement element = driver.findElement(By.id("myElement"));
element.click();
wait.until(ExpectedConditions.visibilityOf(element));