0
您好,我試圖執行,同時:元素在緩存中沒有發現 - 執行while語句
while edit_button.is_displayed():
self.click_edit_button()
self.click_delete_trainer_button()
alert = self.driver.switch_to_alert()
alert.accept()
time.sleep(5)
self.driver.refresh()
,但我發現這個錯誤總是:
StaleElementReferenceException: Message: Element not found in the cache - perhaps the page has changed since it was looked up
我讀到python中有必要刷新頁面,當這個錯誤發生,但我試過上面,它不工作
任何想法?
你幫了我很多。正常工作! – RFtests