Based on every answer and piece of documentation I've seen, the following should wait for the element at xpath path
:
delay = some amount of time way longer than I know is needed
driver = webdriver.Firefox()
driver.get(url)
wait = WebDriverWait(driver, delay, ignored_exceptions=NoSuchElementException)
wait.until(EC.presence_of_element_located(driver.find_element_by_xpath(path)))
but no matter what I do it always throws a NoSuchElementException
immediately after getting the url. And before anyone marks this as a duplicate or calls me out on it, I am aware of this answer and although the element I'm looking for is in some kind of wrapper, I got the same problem when trying the above looking for that wrapper instead (also it works if I just provide a normal sleep
call instead of the Expected Condition
stuff which makes me think I don't need to manually enter into the wrapper). What's the point of having a function for waiting for an element to be loaded that doesn't wait until the element is loaded? Any help in solving this problem would be greatly appreciated.