As the title suggests need to wait for dynamically loaded material. The material shows when scrolling to the end of the page each time.
Currently trying to do this by the following:
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
WebDriverWait(driver, 5).until(expected_conditions.presence_of_element_located(
(By.XPATH, "//*[@id='inf-loader']/span[1][contains(@style, 'display: inline-block')]")))
Is the xpath the problem here (not all that familiar)? It keeps timing out even though the display style does change when scrolling with selenium.