If the code paths are correct, the location element does not exist
dri.find_element(By.XPATH,'//*[@id="submitButton"]/span').click() sleep(2) dri.find_element(By.XPATH,"//span[contains(text(),'button')]").click() # sleep(2) #Be sure to do the wait, otherwise the response is too fast for the browser to keep up dri.find_element(By.XPATH,"//li[contains(text(),'Dropdown box')]").click()
Similar Posts:
- selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
- [Solved] Selenium Error: ElementClickInterceptedException
- Solution to the problem that ends with cannot locate in XPath
- Selenium: How to Solve Staleelementreferenceexception error (Three Methods)
- Message: stale element reference: element is not attached to the page document error solution
- How to Solve stale element reference: element is not attached to the page document
- Four ways to solve selenium’s error “element is not clickable at point…”
- The XPath tool plug-in for Firefox browser (not supported by advanced versions of Firefox)
- Function of double slash in XPath / / double slash
- Python skills — XPath helper in Chrome browser