Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ai-drive-byte opened this issue Apr 27, 2025 · 0 comments

Comments

@ai-drive-byte
Copy link

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)

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant