求助探讨, CefSharp 嵌入控件能不能配合 Selenium 一起使用!

2023-04-06 15:57:12 +08:00
 atfeel

我用的是 C# CefSharp79.1.360 Selenium 3.141.0(chromedriver.exe79.0.3945.36)

代码如下: CefSettings settings = new CefSettings(); settings.RemoteDebuggingPort = 9222; Cef.Initialize(settings);

    browser = new ChromiumWebBrowser("about:blank");
    Controls.Add(browser);

    Thread.Sleep(1000);

    ChromeOptions options = new ChromeOptions();
    options.DebuggerAddress = "localhost:9222";
    ChromeDriver driver = new ChromeDriver(options);///执行到这句报错、、、、、、、、、

    
    
    

报错信息: A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://localhost:50143/session. The status of the exception was ReceiveFailure, and the message was: 基础连接已经关闭: 接收时发生错误。

很怀疑,到底 Selenium 支不支持嵌入 CefSharp 的,,,谁成功过的吗?

538 次点击
所在节点    问与答
1 条回复
atfeel
2023-04-06 19:52:28 +08:00
有人知道吗,非常不喜欢 javascript

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/930305

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX