一分耕耘,一分收获!既然打开了这篇文章《&#使用seleniumbase》,就坚持看下去吧!文中内容包含等等知识点...希望你能在阅读本文后,能真真实实学到知识或者帮你解决心中的疑惑,也欢迎大佬或者新人朋友们多留言评论,多给建议!谢谢!
>我当前正在使用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())
我在程序试图获取第二个驱动程序时会不断收到错误。
>
以上就是本文的全部内容了,是否有顺利帮助你解决问题?若是能给你带来学习上的帮助,请大家多多支持golang学习网!更多关于文章的相关知识,也可关注golang学习网公众号。
本文内容来源于互联网,如有侵权请联系删除。
