We are using a wait method for the element we will interact on the page. Something like;
public WebElement visibilityWaitOfElement(int timeoutInSeconds, WebElement element) {
return new FluentWait<>(webDriver).
withTimeout(timeoutInSeconds, TimeUnit.SECONDS).
pollingEvery(500, TimeUnit.MILLISECONDS).
ignoring(NotFoundException.class).ignoring(NoSuchElementException.class).
until(visibilityOf(element));
}
webdriver.click(visibilityWaitOfElement(15, element));
So you should use a method like visibilityWaitOfElement for all the methods on the page you will interact right after page load.
And also if there is a spin bar, you should wait for it to dissapperar after page load. Like you suggested.
WebDriverWait wait = new WebDriverWait(webDriver, seconds);
wait.until(invisibilityOfElementLocated(elementLocator));