atfeel
V2EX  ›  问与答

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

  •  
  •   atfeel · Apr 6, 2023 · 1158 views
    This topic created in 1153 days ago, the information mentioned may be changed or developed.

    我用的是 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
       Apr 6, 2023
    有人知道吗,非常不喜欢 javascript
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1414 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:11 · PVG 01:11 · LAX 10:11 · JFK 13:11
    ♥ Do have faith in what you're doing.