0

I am currently creating a program in Python which uses the seleniumbase library for web automation. It works as intended for the most part, however, occasionally, I receive the error SessionNotCreatedException when I try to use SB or BaseCase. Does anybody know of any common causes for this exception?

(here is an example code block:)

from seleniumbase import BaseCase from webdriver_manager.chrome import ChromeDriverManager BaseCase.main(__name__, __file__, "--uc") class MultipleDriversTest(BaseCase): def test_multiple_drivers(self): if self.browser == "safari": self.open_if_not_url("about:blank") print("\n Safari doesn't support multiple drivers.") self.skip("Safari doesn't support multiple drivers.") url1 = "https://invideo.io/perf/ga-ai-video-generator-web/?utm_source=google&utm_medium=cpc&utm_campaign=Top16_Search_Brand_Exact_EN&adset_name=InVideo&keyword=invideo&network=g&device=c&utm_term=invideo&utm_content=InVideo&matchtype=e&placement=g&campaign_id=18035330768&adset_id=140632017072&ad_id=616240030555&gad_source=1&gclid=Cj0KCQiAvvO7BhC-ARIsAGFyToWFf0L_8iqkB32qg9prKxVApsklZ8HA69LW2O0Z6XC1nbXXz9sCTTEaAinZEALw_wcB" driver1 = self.driver self.activate_cdp_mode(url1) url2 = "https://temp-mail.org/en" driver2 = self.get_new_driver(undetectable=True) self.activate_cdp_mode(url2) self.sleep(2) print(driver1.get_current_url()) self.sleep(2) print(driver2.get_current_url()) 
3
  • Is SessionNotCreatedException the complete error message?
    – dev_light
    CommentedJan 31 at 15:37
  • Here is the complete error message for the code block I provided: test16.py - selenium.common.exceptions.SessionNotCreatedException: Message: session not created: cannot connect to chrome at 12...
    – Zak Virgo
    CommentedFeb 1 at 17:33
  • Also, in this case, the error occurs when the program attempts to get the second driver.
    – Zak Virgo
    CommentedFeb 6 at 21:58

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.