webdriverio-community / wdio-intercept-service

🕸 Capture and assert HTTP ajax calls in webdriver.io
MIT License
104 stars 33 forks source link

wdio-intercept-service and multiremote project #54

Open ericzered opened 4 years ago

ericzered commented 4 years ago

Hello, I'm using wdio-intercept-service in my wdio project and it's working great, but I see that I can't use it in the case of Multiremote : https://webdriver.io/docs/multiremote.html browser.setupInterceptor() is working (if all browsers launched are compatible), but browser['chrome'].setupInterceptor() is giving me an error:

**browser.chrome.setupInterceptor is not a function**

But browser['chrome'] is ok for all WebdriverIO.BrowserObject methods like .url()... So how can I make wdio-intercept-service works in a multiremote project ? Thanks !

chmanie commented 4 years ago

That looks interesting. I'll look into it!

pmerwin commented 2 years ago

I have a use case for this as well :)

pmerwin commented 1 year ago

As a workaround I found if you're using saucelabs you can intercept using their API in mutliremote:

if you are running through the saucelabs service: @wdio/sauce-service you should have the getPageLogs() method available

const reqs = await mBrowser.getPageLogs('sauce:network');

where mBrowser is either remote you want logs from ^