Reputation: 1
for card in cards:
time.sleep(2)
card.click()
time.sleep(2)
button = driver.find_element(By.XPATH, '//*[@id="VacancyHeader"]/div[3]/div[1]/a')
button.click()
time.sleep(2)
driver.quit()
Traceback (most recent call last): File "D:\VscodeFiles\PYTHON\SELENIUM-ENV\DISPARA-CURRICULO\env\main.py", line 44, in <module> card.click() File "D:\VscodeFiles\PYTHON\SELENIUM-ENV\DISPARA-CURRICULO\env\lib\site-packages\selenium\webdriver\remote\webelement.py", line 94, in click self._execute(Command.CLICK_ELEMENT) File "D:\VscodeFiles\PYTHON\SELENIUM-ENV\DISPARA-CURRICULO\env\lib\site-packages\selenium\webdriver\remote\webelement.py", line 395, in _execute return self._parent.execute(command, params) File "D:\VscodeFiles\PYTHON\SELENIUM-ENV\DISPARA-CURRICULO\env\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 347, in execute self.error_handler.check_response(response) File "D:\VscodeFiles\PYTHON\SELENIUM-ENV\DISPARA-CURRICULO\env\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: stale element not found (Session info: chrome=123.0.6312.105); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception Stacktrace: GetHandleVerifier [0x00F54CC3+225091] (No symbol) [0x00E84E11] (No symbol) [0x00D29A7A] (No symbol) [0x00D35691] (No symbol) [0x00D35CEE] (No symbol) [0x00D2E86B] (No symbol) [0x00D2CF05] (No symbol) [0x00D2F862] (No symbol) [0x00D2F8E0] (No symbol) [0x00D62F31] (No symbol) [0x00D596B2] (No symbol) [0x00D7F55C] (No symbol) [0x00D5930E] (No symbol) [0x00D7F7F4] (No symbol) [0x00D95CB0] (No symbol) [0x00D7F2F6] (No symbol) [0x00D579B9] (No symbol) [0x00D5879D] sqlite3_dbdata_init [0x013C9A63+4064547] sqlite3_dbdata_init [0x013D106A+4094762] sqlite3_dbdata_init [0x013CB968+4072488] sqlite3_dbdata_init [0x010CC9C9+930953] (No symbol) [0x00E907E4] (No symbol) [0x00E8AD08] (No symbol) [0x00E8AE31] (No symbol) [0x00E7CAA0] BaseThreadInitThunk [0x754BFCC9+25] RtlGetAppContainerNamedObjectPath [0x76EC7C5E+286] RtlGetAppContainerNamedObjectPath [0x76EC7C2E+238]
I have already tried several famous solutions here on stack overflow such as stale element reference: element is not attached to the page document and I was not successful in fixing the mistake
Upvotes: 0
Views: 79