V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
atfeel
V2EX  ›  问与答

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

  •  
  •   atfeel · 2023-04-06 15:57:12 +08:00 · 518 次点击
    这是一个创建于 385 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我用的是 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 的,,,谁成功过的吗?

    atfeel
        1
    atfeel  
    OP
       2023-04-06 19:52:28 +08:00
    有人知道吗,非常不喜欢 javascript
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5620 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 03:12 · PVG 11:12 · LAX 20:12 · JFK 23:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.