You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing an issue with undetected ChromeDriver when trying to locate an element by XPath. The same code works perfectly with the standard ChromeDriver, but fails with undetected ChromeDriver. Using undetected_chromedriver
driver = uc.Chrome()
driver.get("https://example.com/")
Locating the email field
email_field = driver.find_element(By.XPATH, '//*[@id="user_email"]')
email_field.send_keys('555') # This fails with undetected ChromeDriver
Issue:
The element with XPath //*[@id="user_email"] cannot be located when using undetected ChromeDriver.
When using the standard ChromeDriver, the exact same code successfully finds the element and sends keys without issues.
Observations:
Headless mode is disabled.
The element is not inside an iframe.
Explicit waits (e.g., WebDriverWait) did not help resolve the issue.
The element is visible and interactive when using the browser manually.
Question:
Is there a known issue or limitation with undetected ChromeDriver in locating elements by XPath? Are there additional configurations or arguments required to make this work?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am experiencing an issue with undetected ChromeDriver when trying to locate an element by XPath. The same code works perfectly with the standard ChromeDriver, but fails with undetected ChromeDriver. Using undetected_chromedriver
driver = uc.Chrome()
driver.get("https://example.com/")
Locating the email field
email_field = driver.find_element(By.XPATH, '//*[@id="user_email"]')
email_field.send_keys('555') # This fails with undetected ChromeDriver
Issue:
The element with XPath //*[@id="user_email"] cannot be located when using undetected ChromeDriver.
When using the standard ChromeDriver, the exact same code successfully finds the element and sends keys without issues.
Observations:
Headless mode is disabled.
The element is not inside an iframe.
Explicit waits (e.g., WebDriverWait) did not help resolve the issue.
The element is visible and interactive when using the browser manually.
Question:
Is there a known issue or limitation with undetected ChromeDriver in locating elements by XPath? Are there additional configurations or arguments required to make this work?
Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions