Closed xiongzhenglong closed 2 weeks ago
Duplicate of https://github.com/seleniumbase/SeleniumBase/issues/1774#issuecomment-1444399269, https://github.com/seleniumbase/SeleniumBase/issues/2032#issuecomment-1693931853, https://github.com/seleniumbase/SeleniumBase/issues/2151#issuecomment-1741234068, 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.
(driver.requests
is part of selenium-wire
)
You can use sb.driver
to access the driver
from from sb
.
There are ways of getting that data in UC Mode without Wire Mode. Examples:
Description` I'm encountering a challenge when using SeleniumBase. When using the sb instance, I can easily load cookies (e.g., sb.load_cookies(name="cookies.txt")), which is very convenient for maintaining session state. However, I have found that sb cannot directly capture network requests.
On the other hand, when using a driver instance, I can capture network requests, but it’s not straightforward to load cookies or maintain the session state. This creates difficulties when working with websites that require a logged-in state.
Problem The sb instance allows easy cookie loading but doesn't support direct request capture. The driver instance supports request capture but lacks the convenience of loading cookies or maintaining a session state effectively.
this is my code: