Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13951

StaleElementReferenceException: how to make it wait longer?

$
0
0

I'm trying to write an automated messages. The issue is, it takes a bit longer to write the message and then it gets the StaleElementReference error.

the error happened when it is trying to clear the person_title. and I think this should have longer waiting time because when I cut the message short (taking out several important details), the automation had no issue. How to fix it?

# Locate search box through x_path    search_box = '//*[@id="side"]/div[1]/div/div[2]/div[2]/div/div[1]/p'    person_title = wait.until(lambda driver:driver.find_element(By.XPATH,search_box))    # Clear search box if any contact number is written in it    person_title.clear()

Viewing all articles
Browse latest Browse all 13951

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>