【问题标题】:Running Chrome from PortableApps with Selenium WebDriver fails使用 Selenium WebDriver 从 PortableApps 运行 Chrome 失败
【发布时间】:2020-09-11 13:30:40
【问题描述】:

我有 C# Selenium 项目,想运行从 here 下载的便携式 Chrome。

我的chromeOptions 是:

chromeOptions.BinaryLocation = Path.GetFullPath("C:\", "tests.browsers", "windows", "chrome", "GoogleChromePortable.exe"));
chromeOptions.AddArgument("--enable-logging");
chromeOptions.AddArgument("--v=1");
chromeOptions.AddExtension(Path.Combine("path", "to", "kontur-plugin.crx"));

但是当我运行测试时,Chrome 会打开并显示:

(通知说“无法登录 %EXTENSIONNAME%,请单击以再次加载它)

chrome_debug.log 没有错误。

我做错了什么?我怎样才能找出问题所在?

【问题讨论】:

    标签: selenium google-chrome selenium-webdriver selenium-chromedriver portability


    【解决方案1】:

    这可能会对您有所帮助 - Stackoverflow post

    此外,您的 CRX 文件应添加为文件,而不仅仅是路径。

    【讨论】:

      猜你喜欢
      • 2019-05-08
      • 2014-07-12
      • 2020-02-17
      • 1970-01-01
      • 1970-01-01
      • 2012-02-01
      • 1970-01-01
      • 2019-10-25
      • 1970-01-01
      相关资源
      最近更新 更多