Zalenium网格//浏览器配置文件// Cookie

问题描述

我正在寻找一种允许使用相同浏览器配置文件启动Zalenium Chrome容器的方法。特别是我对简化Web cookie身份验证感兴趣。当Zalenium中枢创建运行中的浏览器容器时,尽管正确调用了desired_capabilities,但该容器似乎是无状态的,并且不再包含cookie。

我在Python中调用集线器的方式是:

    executor = "http://" + self.config.get('REMOTE','host') + ":4444/wd/hub"
    exec_path_chrome = self.config.get('REMOTE','exec_path_chrome')
    options = webdriver.ChromeOptions() #Chrome Options
    options.add_argument("--user-data-dir=" + exec_path_chrome)
    options.add_argument("--profile-directory=" + self.profile)
    options.add_argument("--window-size=700,1000 ")
    options.add_argument("--window-position=800,0")
    self = webdriver.Remote.__init__(self,command_executor=executor,desired_capabilities=options.to_capabilities())

我与chrome://version进行了交叉核对,发现浏览器使用了正确的配置文件文件夹。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)