-
I have a code block which uses a Seleniumbase webdriver:
When I run this code, I receive the following error:
What could be the reason for this error? |
Beta Was this translation helpful? Give feedback.
Answered by
mdmintz
Jan 27, 2025
Replies: 1 comment
-
When activating UC Mode from multiple drivers, try it like this: from seleniumbase import BaseCase
BaseCase.main(__name__, __file__, "--uc")
class MultipleDriversTest(BaseCase):
def test_multiple_drivers(self):
url1 = "https://seleniumbase.io/demo_page"
self.activate_cdp_mode(url1)
url2 = "https://seleniumbase.io/coffee/"
driver2 = self.get_new_driver(undetectable=True)
self.activate_cdp_mode(url2)
self.sleep(2)
self.switch_to_default_driver()
print(self.get_current_url())
self.sleep(2)
self.switch_to_driver(driver2)
print(self.get_current_url()) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mdmintz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When activating UC Mode from multiple drivers, try it like this: