Skip to content

Handling Unexpected Tab Closure and Navigation Issues with SeleniumBase #2330

Answered by mdmintz
benfrankie asked this question in Q&A
Discussion options

You must be logged in to vote

Hello. What you're describing is the default behavior in UC Mode when you use driver.get(url) to open a URL that has bot-detection software running on it. The current tab is replaced with a clean one (that doesn't have any traces of Selenium from within the Chrome browser console) and the new URL is opened.

You can use driver.default_get(url) to open the new URL in the current tab without using UC Mode. Or you can try driver.uc_open(url), which has better anti-detection mechanisms than driver.default_get(url), but it's not as good as driver.get(url) / driver.uc_open_with_tab(url) / driver.uc_open_with_reconnect(url, reconnect_time) (which close the current tab and open a new one).

This is…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@benfrankie
Comment options

@mdmintz
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants