I've built and installed Selenium 4.0.0-beta-1 python wheel from source to test CDP functionalities. Specifically I would like to intercept requests using Fetch Domain protocol.
I can enable the domain using Fetch.enable command, but I don't see how I can subscribe to events like Fetch.requestPaused to intercept the request:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
driver = webdriver.Chrome()
# Enable Fetch domain
driver.execute_cdp_cmd('Fetch.enable', cmd_args={})
# How to subscribe to Fetch.requestPaused event??
# driver.add_cdp_event_listener ...
Thanks for any help!