Skip to content

Driver.add_cdp_listener Network.webSocketFrameReceived not keep feedback data #3704

Closed
@ai-drive-byte

Description

@ai-drive-byte

from seleniumbase import Driver
url = "https://echo.websocket.org/.ws"

is catch only the first ws message then nothing i try difftent approache but i got same problem only first ws message then nothing . also if refreche browser nothing return

i try to run forever the class forever but is same , im not able to keep up watching the ws message .
i also try using the SB and got same

    self.driver = Driver(log_cdp=True, uc_cdp_events=True, uc=True, headless=False)

    # Attach CDP listeners for WebSocket lifecycle & frames :contentReference[oaicite:8]{index=8}
    self.driver.add_cdp_listener("Network.webSocketCreated",
                                 lambda msg: print("[WS Created]\n", pformat(msg)))
    self.driver.add_cdp_listener("Network.webSocketFrameSent",
                                 lambda msg: self._on_frame("Sent", msg))
    self.driver.add_cdp_listener("Network.webSocketFrameReceived",
                                 lambda msg: self._on_frame("Received", msg))

    # Navigate to target URL
    self.driver.get(self.url)

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    UC Mode / CDP ModeUndetected Chromedriver Mode / CDP Modeinvalid usageYou may need to change what you're doing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions