I often have the problem with Selenium that the script crashes because I want to access an element that is not loaded yet.
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method": "xpath", "selector":"//*[@id="ipv4_info"]/span[3]"}
Currently I do it that way, that I put a time.sleep(30)
before such places, but sometimes it takes longer or shorter until the element loads.
Is there any way to wait until the element is loaded and as soon as it is loaded immediately continue with the rest of the code?