webdriverio-community / wdio-intercept-service

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

Any example using it wdio7? #148

Open unickq opened 3 years ago

unickq commented 3 years ago

Hey,

Trying to set it up with wdio 7 and typescript. Still no luck. Is any working sample available? https://github.com/chmanie/wdio-intercept-example-ts - didn't help much

DrewciferB commented 2 years ago

@unickq I'm just upgrading our WDIO from 6 to 7 and I've run into an issue with this service. I could be wrong but the sample project you linked doesn't have the 'intercept' service added to the test runner services array in wdio.conf.js - it only has services: ['chromedriver'] where it should probably have services: ['chromedriver', 'intercept'] however that sample project is using WDIO v6...if you're like me then you're using v7 and you're getting a different error on compile:

node_modules/wdio-intercept-service/types/wdio-intercept-service.d.ts:60:59 - error TS2694: Namespace 'global.WebDriver' has no exported member 'Client'.
60 type AsyncSync<T> = WebdriverIO.Browser extends WebDriver.Client

This seems to be similar to (this) issue in #186