Skip to content

why not using CDP to make it? #163

Closed

Description

@loquat

Why not use this project to do it? This project doesn't seem to rely on chromedriver.exe

https://github.com/PerditionC/VBAChromeDevProtocol

Activity

  1. GCuser99 commented on Aug 14, 2025

    @GCuser99
    Owner

    Great question. Nothing wrong with using CDP. I have used CDP-only code derived from the referenced project above for simple, very narrowly defined applications. Plus we do incorporate some CDP functionality here in SeleniumVBA, thus making it somewhat of a hybrid approach.

    Here is a modified AI response for comparison. Note that Diego and I have solved one of the major disadvantages of Webdriver mentioned below - Browser/Webdriver version alignment.

    🧭 WebDriver (Edge/Chrome)
    ✅ Advantages
    Standardized API: WebDriver is W3C-compliant, making it portable across browsers (Chrome, Edge, Firefox, etc.).

    Rich ecosystem: Supported by Selenium, Playwright, and other frameworks with robust tooling.

    Capabilities/Options: Allows fine-grained control over browser behavior (e.g., headless mode, proxy settings, extensions, debugger-mode for connecting to existing browser instance etc.).

    Active development: Maintained by browser vendors with frequent updates and bug fixes.

    ❌ Disadvantages
    Performance overhead: Communication via external driver (e.g., chromedriver.exe) introduces latency.

    Limited low-level access: Can't easily intercept network traffic, manipulate rendering, or access internal browser states.

    Dependency management: Requires matching driver versions with browser versions, which can be brittle.

    🧪 Chrome DevTools Protocol (CDP)
    ✅ Advantages
    Direct access: Communicates directly with the browser via WebSocket, bypassing external drivers.

    Low-level control: Enables advanced features like network interception, DOM mutation tracking, performance profiling, and emulation.

    Lightweight: No need for separate executables like chromedriver.exe.

    Real-time feedback: Ideal for dynamic scripting, debugging, and monitoring.

    ❌ Disadvantages

    Complexity: Requires manual handling of protocol messages and session management.

    Limited abstraction: Lacks the high-level convenience of WebDriver’s API unless wrapped by a library.

  2. Repository owner locked and limited conversation to collaborators on Aug 14, 2025
  3. converted this issue into a discussion #164 on Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions