>我当前正在使用seleniumbase进行python中的web自动化,但是,有时我会收到“未创建的会话”错误:
>
test16.py - selenium.common.exceptions.sessionnotcreatedexception: message: session not created: cannot connect to chrome at 12...
from seleniumbase import BaseCase BaseCase.main(__name__, __file__, "--uc") class MultipleDriversTest(BaseCase): def test_multiple_drivers(self): 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) # <- ERR self.activate_cdp_mode(url2) self.sleep(2) print(driver1.get_current_url()) self.sleep(2) print(driver2.get_current_url())
>
以上就是&#使用seleniumbase的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号