Closed Yougz-Teapot closed 3 weeks ago
If by "shuts down the chrome window" you mean that the current tab is closed and a new one opened for uc_open_with_reconnect(url)
and uc_open_with_tab(url)
, then that is expected behavior. The existing tab may contain session_storage / local_storage / cookies / etc. that can reveal the presence of Selenium during bot-detection, so the current tab is closed and a new one opened with the URL that you want. For your situation, you may want to use a regular uc_open()
, if you can. Or just driver.disconnect()
if you only need to disconnect the driver from the browser.
Actually, looks like a bug on Windows in 4.32.6
. (Was testing on a Mac earlier.)
Caused by the removal of --disable-popup-blocking
... As it turns out: That's necessary!
Temporary workaround until the next version is released:
chromium_arg="--disable-popup-blocking"
.
This was resolved in 4.32.7
- https://github.com/seleniumbase/SeleniumBase/releases/tag/v4.32.7
While I'm still fairly new to SeleniumBase I have managed to use it successfully to scrape content using uc_mode until recently. However, now the very same script I have been using shuts down the chrome window when hitting the second "uc_open_with_reconnect()" (within the try block).
I have tried "uc_open_with_tab()" which also shuts down the window. Plain "uc_open()" works fine though.
Since I have not modified the script I'm guessing it's a SB version (I am using SeleniumBase 4.32.6 ; on Windows) or driver version-related issue. I have tried specifying driver_version = "129" as suggested by another user but it did not change the behaviour. I'm having the same issue on another simple test script.
Did someone encounter the same issue recently and was able to solve it please ?
Code sample :
with SB(uc=True) as sb:
...
...
...