chrome-devtools-protocol

How to use Chrome DevTools protocol in Selenium (using Python) for capturing HTTP requests and responses?

时光怂恿深爱的人放手 提交于 2020-07-03 09:26:10
问题 I know that Fetch Domain is used for this purpose but I do not know how exactly I can implement it. In Selenium python, I used the following code to enable issuing of requestPaused events. driver.execute_cdp_cmd("Fetch.enable",{}) driver.get('https://www.example.com') But I do not know how can I handle requestPaused event (I need to call one fulfillRequest or continueRequest / continueWithAuth ). As a result, my program stops working. I really appreciate it if anyone could provide me an