Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webdriver classes conflict on enable uc and wire #2337

Closed
d3cryptofc opened this issue Dec 4, 2023 · 7 comments
Closed

webdriver classes conflict on enable uc and wire #2337

d3cryptofc opened this issue Dec 4, 2023 · 7 comments
Labels
duplicate The answer/solution already exists somewhere UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode

Comments

@d3cryptofc
Copy link

I need to use wire mode and uc too, but...

✅ It works

>>> driver = Driver(wire=True)
>>> driver.requests
[]

❌ It causes a webdriver class conflict

>>> driver = Driver(wire=True, uc=True)
>>> driver.requests
AttributeError: 'Chrome' object has no attribute 'requests'
@mdmintz mdmintz added duplicate The answer/solution already exists somewhere UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode labels Dec 4, 2023
@mdmintz
Copy link
Member

mdmintz commented Dec 4, 2023

Duplicate of #2243 (comment), #1774 (comment), #2032 (comment), #2151 (comment), etc.

Due to unresolved issues with selenium-wire: https://github.com/wkeeling/selenium-wire/search?q=undetected&type=issues, UC Mode and Wire Mode cannot be combined. Pick one or the other.

@mdmintz mdmintz closed this as completed Dec 4, 2023
@uesleivsouza
Copy link

I need to use wire mode and uc too, but...

✅ It works

>>> driver = Driver(wire=True)
>>> driver.requests
[]

❌ It causes a webdriver class conflict

>>> driver = Driver(wire=True, uc=True)
>>> driver.requests
AttributeError: 'Chrome' object has no attribute 'requests'

Did you find a way to make both work together? I am facing the same situation now.

@mdmintz
Copy link
Member

mdmintz commented Jan 25, 2024

#2337 (comment) still holds.

The best alternative involves getting the requests from CDP events.
(See SeleniumBase/examples/uc_cdp_events.py for details.)

@d3cryptofc
Copy link
Author

@uesleivsouza

Did you find a way to make both work together? I am facing the same situation now.

I didn't, infortunely.. also the CDP events doesn't have a HTTP response text, I needed it 😢

@mdmintz
Copy link
Member

mdmintz commented Jan 25, 2024

There’s also #2220.

More info: https://stackoverflow.com/a/52636871/7058266

@uesleivsouza
Copy link

#2337 (comment) still holds.

The best alternative involves getting the requests from CDP events. (See SeleniumBase/examples/uc_cdp_events.py for details.)

Thank you for reply quickly, but unfortunately I think it can't fit to my application, I need to change the request, not only listen it .. I think I have to find another with external tools like proxy.

@gurji999
Copy link

Has anyone figured out a solution for this, or a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate The answer/solution already exists somewhere UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode
Projects
None yet
Development

No branches or pull requests

4 participants