Comments (11)
Yup, I'll archive it asap.
from wdio-intercept-service.
btw, I didn't call before
and beforeTest
/ beforeScenario
functions manually, could you give a suggestion how to call these functions manually?
from wdio-intercept-service.
webdriverajax
is an old version of this library, and you should not attempt to use both it and wdio-intercept-service
at the same time. You also shouldn't need to invoke before
/ beforeScenario
manually, they should be invoked by the local runner automatically if you have configured the service in wdio.conf.js
correctly.
@chmanie can we get webdriverajax
archived?
also @DPGZl , what version of WebdriverIO are you using?
from wdio-intercept-service.
Hi @tehhowch, thanks for your response, according to your suggestion I've removed webdriverajax
from my project, and I config as services: ['intercept']
, but I still run into the same error.
I'm not using webdriverio
directly, instead below are the wdio related packages I'm using:
"@wdio/cli": "6.0.16",
"@wdio/junit-reporter": "^6.3.6",
"@wdio/local-runner": "6.0.16",
"@wdio/mocha-framework": "6.0.16",
"@wdio/selenium-standalone-service": "6.0.16",
"@wdio/spec-reporter": "6.0.16",
"wdio-chromedriver-service": "6.0.4",
"wdio-intercept-service": "^4.3.1",
from wdio-intercept-service.
Please upgrade from v6 to v7. The signature of the before
hook changed, and the 3rd argument is now the browser object. In v6 and earlier, there is no third argument and thus the browser
parameter is undefined
, and shadows the global browser
. This has been broken since 4cb8d0d, apparently.
If you cannot upgrade to the current LTS or higher, please open a PR to this repo that changes the "before" hook in index.js
to use either the provided 3rd argument or the global, depending on the presence of the argument.
e.g.
before() {
const browser = typeof arguments[2] === 'undefined' ? globalThis.browser : arguments[2];
//...rest is unmodified
from wdio-intercept-service.
You don't actually have to upgrade to v7, v6.10 will suffice, as that is when the change was made to start providing browser
to the before hook: webdriverio/webdriverio@22ee028
from wdio-intercept-service.
@tehhowch , you mean I need to update @wdio/cli
to v6.10? (not webdriverio
, right? because I'm using @wdio/cli
.)
I've tried to update @wdio/cli
to v6.10, but the issue still exists.
The issue is resolved when I tried to debug on my local like the example you list above, so I'm wondering if it's ok to open a PR.
from wdio-intercept-service.
@tehhowch , you mean I need to update
@wdio/cli
to v6.10? (notwebdriverio
, right? because I'm using@wdio/cli
.)I've tried to update
@wdio/cli
to v6.10, but the issue still exists.The issue is resolved when I tried to debug on my local like the example you list above, so I'm wondering if it's ok to open a PR.
To update your WDIO packages, you should modify all @wdio/**
entries in your package.json to be ^6.10
and then run npm i
or yarn
, etc.
@wdio/local-runner
will be the most important one as that is the part of the framework that is running the tests and invoking the hooks, which is where the issue is occurring.
And yes, feel free to open a PR (with a test!) that restores support for WDIO 5.x, <6.10.
from wdio-intercept-service.
@DPGZl were you interested in contributing the fix?
from wdio-intercept-service.
Related Issues (20)
- Transition package from CJS to ESM HOT 3
- After updating to 4.3.0, attempting to get the network response when a filter is applied results in an error "Cannot read property trim of undefined" HOT 10
- (Version 4.2.2) Occasionally getting a java heap space error when running the network intercept too often HOT 1
- [Version 4.2.2] browser.disableInterceptor() is not a function HOT 1
- browser.getRequests() hanging without @wdio/sync module HOT 15
- Best practices with the wdio intercept service HOT 2
- Interceptor results are inconsistent
- Is there a way to abort the request? HOT 4
- Exception in .getRequests HOT 3
- Getting pending requests too HOT 1
- Intercepting segmentio messages HOT 5
- Not able to capture some api's called on Submit action HOT 4
- No request(empty array) returned from intercept service HOT 10
- Does getRequests() capture all the 'GET' calls in the network log? HOT 2
- can we have support async/await for wdio-intercept-service HOT 7
- wdio-intercept-service is not capturing requests invoked in iframe HOT 6
- Cypress does not intercept graphql query HOT 2
- Other request types not being collected HOT 7
- Getting [wdio-intercept-service]: the "index" property must be a non-negative integer error while trying to capture GET request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wdio-intercept-service.