this.driver = await new webDriver.Builder().forBrowser("chrome").build();
let session = await this.driver.session_
let debuggerAddress = await session.caps_.map_.get("goog:chromeOptions").debuggerAddress;
let AddressString = debuggerAddress.split(":");
const protocol = await CDP({
port: AddressString[1]
});
const {
Fetch
} = protocol;
await Fetch.enable({
patterns: [{
urlPattern: "*api*",
resourceType: "XHR"
}]
});
await Fetch.requestPaused(async ({
request
}) => {
console.log(request)
})