For this error, you can check whether there are duplicate elements on the next page
For example, the following: run the error on the old newspaper and find that there are duplicate elements on the page
password=(By.XPATH,'//input[@placeholder="Please input the password"])'
Solution: find the one you need, as follows
password=(By.XPATH,'(//input[@placeholder="Please input the password"])[2]')
Specify element positioning method: (//span [text() = ‘match’) [2]
Read More:
- Python Selenium: element is not attached to the page document error
- [Solved] Python Selenium Error: AttributeError: ‘WebDriver‘ object has no attribute ‘find_element_by_xpath‘
- [Solved] Python-selenium locates an element cannot be clicked error: ElementClickInterceptedException
- [Solved] selenium.common.exceptions.JavascriptException: Message: javascript error: windows is not defined
- [Solved] Selenium.common.exceptions.WebDriverException: Message: newSession
- [Solved] selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn
- [Solved] Selenium error: staleelementreferenceexception exception
- Python+Selenium Error: AttributeError: ‘WebDriver‘ NameError: name ‘By‘ is not defined
- [Solved] Selenium python send_key error: list object has no attribute
- Mac Selenium Use Error: Can not connect to the Service chromedriver
- [Python] Right-click Selenium to Save the picture error: attributeerror: solution to module ‘pyscreen’ has no attribute ‘locationonwindow’
- Python Selenium Common Keyboard Controls
- [Solved] Pygame.error: mixer not initialized & pygame.error: WASAPI can‘t find requested audio endpoint: Could not Find the Element.
- [Solved] AttributeError: ‘WebDriver‘ object has no attribute ‘find_element_by_id‘
- [Solved] Python Image Library fails with message “decoder JPEG not available” – PIL
- [Solved] AttributeError: module ‘selenium.webdriver‘ has no attribute ‘Chrome‘
- [Solved] ValueError: only one element tensors can be converted to Python scalars
- [Solved] selenium Error: ERROR:ssl_client_socket_impl.cc(962)] handshake failed; returned -1, SSL
- Chromdriver Install error: File “C:\python37\lib\site-packages\selenium\webdriver\common\service.py”, line 76, in start stdin=PIPE) File…
- Pandas Error: ValueError: setting an array element with a sequence.