webdriverio-community / wdio-intercept-service Goto Github PK
View Code? Open in Web Editor NEW🕸 Capture and assert HTTP ajax calls in webdriver.io
License: MIT License
🕸 Capture and assert HTTP ajax calls in webdriver.io
License: MIT License
Hi,
As I understand currently there is no possibility to intercept img requests.
@chmanie are there any plans to add this functionality? This would be really useful for verification of analytics!
5.5.0
to 5.6.0
.This version is covered by your current version range and after updating it in your project the build failed.
@wdio/local-runner is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
00bdd48
v5.6.0
e409aea
update package list in readme (#3590)
c36d1f7
typescript promise commands (#3577)
792f089
Adding outputDir to standalone (#3583)
9e03559
webdriverio: extend wait command prefixes (#3548)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Hello,
I'm using Codeceptjs along with wdio. I wanted to try out the intercept service but I get the following error when setting up intercept
in services array for wdio plugin:
Could not load plugin wdio from module './plugin/wdio':
Couldn't initialize service wdio-intercept from wdio plugin config.
It should be available either in '@wdio/wdio-intercept-service' package
I am not able to capture ajax request send to google analytics. Has anyone tried this?
Thanks.
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 !
Hello,
I would like to know is that possible to run intercept service without wdio?
Since I want to dynamic config the proxy setting with different isntance, therefore i am looking a way to use intercept service without wdio.
Thank you.
The plugin uses some new JS features which are not working in IE11. The fix is pretty straightforward, I will provide a PR.
Hello,
It looks like the service is not working with typescript, is their a way to fix it ?
steps to reproduce :
# clone a typescript boilerplate
$ git clone [email protected]:jpolley/WebdriverIO_v5_TypeScript.git
$ cd WebdriverIO_v5_TypeScript
# install dependencies
$ npm i
# check this spec is working
$ npm test -- --spec dropdown.spec.ts
# install intercept service
$ npm i --save-dev wdio-intercept-service
# add intercept to wdio conf, ie. `services: ['selenium-standalone', 'intercept']`
$ sed -i.bak -E "s/(services: \['selenium-standalone')\]/\1, 'intercept'\]/" wdio.conf.js
# add an intercept step to a spec ie. `return browser.url('/dropdown').setupInterceptor();`
$ sed -i.bak -E "s/(return browser.url\('/dropdown'\));/\1.setupInterceptor();/" src/pages/DropdownPage.ts
# run it, it's not working :(
$ npm test -- --spec dropdown.spec.ts
npm info it worked if it ends with ok
npm verb cli [
npm verb cli '/usr/local/Cellar/node/12.8.0/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'test',
npm verb cli '--',
npm verb cli '--spec',
npm verb cli 'src/pages/DropdownPage.ts'
npm verb cli ]
npm info using [email protected]
npm info using [email protected]
npm verb run-script [ 'pretest', 'test', 'posttest' ]
npm info lifecycle [email protected]~pretest: [email protected]
npm info lifecycle [email protected]~test: [email protected]
> [email protected] test /Users/user/WebdriverIO_v5_TypeScript
> wdio "--spec" "src/pages/DropdownPage.ts"
Execution of 1 spec files started at 2020-01-20T22:36:48.267Z
2020-01-20T22:36:48.269Z DEBUG @wdio/utils:initialiseServices: initialise wdio service "selenium-standalone"
2020-01-20T22:36:48.304Z DEBUG @wdio/utils:initialiseServices: initialise wdio service "intercept"
2020-01-20T22:36:48.306Z INFO @wdio/cli:launcher: Run onPrepare hook
2020-01-20T22:36:49.568Z INFO @wdio/local-runner: Start worker 0-0 with arg: --spec,src/pages/DropdownPage.ts
[0-0] 2020-01-20T22:36:49.779Z INFO @wdio/local-runner: Run worker command: run
[0-0] RUNNING in chrome - /src/pages/DropdownPage.ts
[0-0] 2020-01-20T22:36:49.947Z DEBUG @wdio/utils:initialiseServices: initialise wdio service "intercept"
[0-0] 2020-01-20T22:36:49.948Z DEBUG @wdio/local-runner:utils: init remote session
[0-0] 2020-01-20T22:36:49.949Z INFO webdriverio: Initiate new session using the webdriver protocol
[0-0] 2020-01-20T22:36:49.950Z INFO webdriver: [POST] http://127.0.0.1:4444/wd/hub/session
[0-0] 2020-01-20T22:36:49.950Z INFO webdriver: DATA {
capabilities: { alwaysMatch: { browserName: 'chrome' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'chrome' }
}
[0-0] 2020-01-20T22:36:52.350Z ERROR @wdio/runner: TSError: ⨯ Unable to compile TypeScript:
src/pages/DropdownPage.ts(5,41): error TS2339: Property 'setupInterceptor' does not exist on type 'void'.
at createTSError (/Users/user/WebdriverIO_v5_TypeScript/node_modules/ts-node/src/index.ts:261:12)
at getOutput (/Users/user/WebdriverIO_v5_TypeScript/node_modules/ts-node/src/index.ts:367:40)
at Object.compile (/Users/user/WebdriverIO_v5_TypeScript/node_modules/ts-node/src/index.ts:558:11)
at Module.m._compile (/Users/user/WebdriverIO_v5_TypeScript/node_modules/ts-node/src/index.ts:439:43)
at Module._extensions..js (internal/modules/cjs/loader.js:879:10)
at Object.require.extensions.<computed> [as .ts] (/Users/user/WebdriverIO_v5_TypeScript/node_modules/ts-node/src/index.ts:442:12)
at Module.load (internal/modules/cjs/loader.js:731:32)
at Function.Module._load (internal/modules/cjs/loader.js:644:12)
at Module.require (internal/modules/cjs/loader.js:771:19)
at require (internal/modules/cjs/helpers.js:68:18)
[0-0] Error: ⨯ Unable to compile TypeScript:
src/pages/DropdownPage.ts(5,41): error TS2339: Property 'setupInterceptor' does not exist on type 'void'.
[0-0] 2020-01-20T22:36:52.373Z INFO webdriver: COMMAND deleteSession()
[0-0] 2020-01-20T22:36:52.373Z INFO webdriver: [DELETE] http://127.0.0.1:4444/wd/hub/session/f3c1a49088665b5cb89c5ce92b87383d
2020-01-20T22:36:52.553Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in chrome - /src/pages/DropdownPage.ts
2020-01-20T22:36:52.554Z INFO @wdio/cli:launcher: Run onComplete hook
2020-01-20T22:36:52.554Z INFO @wdio/selenium-standalone-service: shutting down all browsers
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:04
2020-01-20T22:36:52.555Z INFO @wdio/local-runner: Shutting down spawned worker
2020-01-20T22:36:52.807Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2020-01-20T22:36:52.808Z INFO @wdio/local-runner: shutting down
npm verb lifecycle [email protected]~test: unsafe-perm in lifecycle true
npm verb lifecycle [email protected]~test: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/user/WebdriverIO_v5_TypeScript/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
npm verb lifecycle [email protected]~test: CWD: /Users/user/WebdriverIO_v5_TypeScript
npm info lifecycle [email protected]~test: Failed to exec test script
npm ERR! Test failed. See above for more details.
npm verb exit [ 1, true ]
npm timing npm Completed in 5456ms
npm verb code 1
Thanks for any help.
Hey, I installed webdriverajax via npm (it installs "webdriverajax": "^2.1.0" by default), I have "webdriverio": "^4.8.0".
When I try to run a code like below:
it('3.1.1 - should create a new person with required data:', function () {
PeopleCreateNewPage.open();
PeopleCreateNewPage.newFirstName.setValue(context.new_person_first_name);
PeopleCreateNewPage.newLastName.setValue(context.new_person_last_name);
browser.setupInterceptor();
browser.submitForm("#person_edit_form");
browser.pause(5000);
console.log(browser.getRequest(0));
it returns me an error: unknown error: Cannot read property '0' of undefined I also tried to use browser.getRequests() without any index and then I see the Could not find request with index undefined error, I am not sure what is an issue? Could you please take a look at that? Thank you.
Using Chromedriver.
Any browser settings needed or time delay needed?
I am not blocking any third party cookies
[chrome 87.0.4280.88 mac os x #0-0] JavaScript stack:
[chrome 87.0.4280.88 mac os x #0-0] Error: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
[chrome 87.0.4280.88 mac os x #0-0] at setup (eval at executeAsyncScript (:556:26), :13:16)
[chrome 87.0.4280.88 mac os x #0-0] at eval (eval at executeAsyncScript (:556:26), :191:6)
[chrome 87.0.4280.88 mac os x #0-0] at eval (eval at executeAsyncScript (:556:26), :192:4)
[chrome 87.0.4280.88 mac os x #0-0] at executeAsyncScript (:556:47)
[chrome 87.0.4280.88 mac os x #0-0] at :571:29
[chrome 87.0.4280.88 mac os x #0-0] at callFunction (:450:22)
[chrome 87.0.4280.88 mac os x #0-0] at :464:23
[chrome 87.0.4280.88 mac os x #0-0] at :465:3
[chrome 87.0.4280.88 mac os x #0-0] (Session info: chrome=87.0.4280.88)
[chrome 87.0.4280.88 mac os x #0-0] at processTicksAndRejections (internal/process/task_queues.js:85:5)
[chrome 87.0.4280.88 mac os x #0-0] at WebdriverAjax.setup (/Users/ksubramanian3/Documents/projects/tracking-core/node_modules/wdio-intercept-service/index.js:41:22)
[chrome 87.0.4280.88 mac os x #0-0] at Browser.next [as setupInterceptor] (/Users/ksubramanian3/Documents/projects/tracking-core/node_modules/@wdio/utils/build/monad.js:95:33)
[chrome 87.0.4280.88 mac os x #0-0] at Context. (/Users/ksubramanian3/Documents/projects/tracking-core/tests/integration/tracking-core.selenium.js:199:13)
We have to validate whether the original functionality of XMLHttpRequest
and fetch
are maintained after replacing them with the interceptor. This can be done by checking for the correct response values after calling them in the tests.
5.7.14
to 5.8.0
.This version is covered by your current version range and after updating it in your project the build failed.
@wdio/mocha-framework is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 24 commits.
ae1004c
v5.8.0
3e59cee
minor wording
43e69c6
blog: add blog for react selector command (#3900)
8f57958
wdio-sync: bump fibers version to 4 (#3898)
c52193d
junit-reporter: fix log file names (#3892)
27725a9
Fix unit tests when contributing on Windows 10 (#3891)
f715a76
fix appium protocols (#3886)
9a16bf3
add docker service to cli wizard supported services
27b8c86
Update JenkinsIntegration.md (#3885)
45962bc
wdio-local-runner: unpipe streams in the end (#3882)
6e5d2a0
apply wdioLogLevel before starting workers (#3872)
cdb2856
Fix headless endpoint (#3876)
57f3e8e
Don't fail element command in IE (#3874)
d006047
Fixes to react$ and react$$ scripts (#3862)
78ca355
wdio-logger: fix setting log level for subloggers and docs (#3871)
There are 24 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Hi,
maybe is not an issue but i'm not able to use GetRequests.
While trying to use it in that way:
var webdriverio = require('webdriverio');
var wdajax = require('webdriverajax');
wdajax.init(client);
client
.init()
.setViewportSize({width:1920,height:1080})
.url('**myurl**')
.setupInterceptor() // capture ajax calls
.waitForExist('//div[2]/div/header/div/div[3]/div/div/div[2]/div/form/div[1]/input',10000)
.setValue('//div[2]/div/header/div/div[3]/div/div/div[2]/div/form/div[1]/input','yuser')
.setValue('//div[2]/div/header/div/div[3]/div/div/div[2]/div/form/div[2]/input','mypassword')
.click('//div[2]/div/header/div/div[3]/div/div/div[2]/div/form/input[5]')
.pause(1000)
.getRequests()
.then(function(requests){console.log(requests);})
.end();
it crashes with following error:
RuntimeError: window.__webdriverajax is undefined
Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:12'
System info: host: 'probe_server-probe_server-2334910', ip: '172.17.0.9', os.name: 'Linux', os.arch: 'amd64', os.version: '4.2.0-c9', java.version: '1.7.0_79'
Driver info: driver.version: unknown
at execute(, ) - index.js:104:27
What I'm doing wrong?
Thanks,
Riccardo
Hi, this might be out of the scope of this project in all honesty, however, I think it might help this plugin to be even more ubiquitous for network capture in the WebdriverIO ecosystem.
The basic principle is quite simple:
When the user setup the interceptor, using the Performance API, get all the events related to the network.
From what I can see here, the following entry types should suffice:
This would however certainly qualified as a breaking change. Therefore, if that's not the default behaviour that the plugin wants to use moving forward, this feature should be behind an option on the setupInterceptor function. However, I do think that it's a better default behaviour than the current one, but an option could still be exposed to allow users to upgrade to the next major update to disable this new behaviour, allowing a more frictionless update.
Does this service have any feature which allows us to update API response and send an update response to UI instead of the actual response?
I started using this service and it has been great. Thank you.
Is there any way it can be made to work on Internet Explorer too?
I get this error on IE11:
Error executing JavaScript
[internet explorer windows #1-0] javascript error: Error executing JavaScript
[internet explorer windows #1-0] at WebdriverAjax.setup at node_modules/wdio-intercept-service/index.js:41:22)
Appreciate any hints.
I am trying to verify that a specific xhr request only happens once. I am making a POST request across domains, which means it sends an OPTIONS
request first. When I look at the requests that are returned from browser.getRequests()
, I see two requests, but the method on both of them is POST
, when the method on the first request should be OPTIONS
. Additionally, the response code seems to be the same on both requests, but for OPTIONS
our server sends a 204
, and for the actual POST
, our server sends a 200
.
I'd like to be able to see which one is the OPTIONS
and which one is the POST
, so I can filter out the OPTIONS
request in this case.
Often somebody is using this API to send metrics.
It would be useful to have them here, what do you think?
I have 50% ready solution about this section, so I can help you with.
Hey, for some reason my code returns this error:
TypeError: client.init(...).url(...).setupInterceptor is not a function
Here's my code:
var webdriverio = require('webdriverio');
var webdriverajax = require('webdriverajax');
var request = require('request');
var request = require('request').defaults({ jar: true });
var options = {
desiredCapabilities: {
browserName: 'chrome',
logLevel: 'verbose'
},
plugins: {
webdriverajax: {}
}
};
var client = webdriverio.remote(options);
var trackInfo;
var songs = [];
client
.init()
.url('https://xxxx.com')
.setupInterceptor()
.expectRequest('GET', '/serve/source', 200)
.getRequest(0)
.then(function(data) {
console.log(data);
})
.pause(5000)
.click('#track-list > .first a.play')
.pause(3000)
.execute(function () {
return window.playList['tracks'][0];
}).then(function (data) {
songs.push(data.value);
})
.end()
Is it meant to be run in another way?
Was hoping to implement this to read request headers, so tried out the example code and got this error:
browser.setupInterceptor is not a function
running chrome
TypeError: browser.setupInterceptor is not a function at Context.<anonymous> (/Users/.../test/analytics.js:14:13) at Promise.F (/usr/local/lib/node_modules/wdio-mocha-framework/node_modules/core-js/library/modules/_export.js:35:28)
Here's the relevant set up details:
"node": "^6.10"
"selenium-standalone": "^6.12.0",
"webdriverajax": "^2.1.0",
"webdriverio": "^4.9.11",
browser.url("https://mywebapp.com/");
browser.setupInterceptor();
browser.click("body > main > section:nth-child(1) > div > a");
browser.waitForVisible("#id-to-get");
var request = browser.getRequest(0);
Any suggestions on how to get this working? If it works this plugin could be a lifesaver. :)
Same code with intercept browser.setupInterceptor() works for other browsers but not for IE and Edge
Is there any additional setting need to do for these browser? or intercept does not work for these?
IE error: [0-0] TypeError in "test name"
Cannot convert undefined or null to object
Edge error:[1-0] Error in "test name"
Could not find request with index 0
Based on a short review of the code, it appears that captured requests are only persisted to window[ns].requests
or session storage when the HTTP call completes. Thus, test code that wants to assert on a possibly long-running request needs to wait for an arbitrary amount of time, which may invariably not be long enough due to temporary network issues, etc.
I think it would be useful to support a simple query method that indicates whether any requests are still in-flight, and thus won't be returned in response to browser.getRequests()
, e.g. browser.hasPendingHttpRequests()
.
This query method could be used internally to support an optional config parameter to getRequests
(default value of false, to preserve existing behavior), that waits for pending network activity to settle before returning the intercepted requests. Then test cases could easily obtain the full HTTP request log:
const allRequests = browser.getRequests({ waitForPendingRequests: true });
// consume requests locally
or via expectations:
browser.expectRequest('GET', 'https://mydomain.com/huge-exports/export-all-the-things.php', 200);
browser.$('button').click(); // Start the download!
browser.assertRequests({ waitForPendingRequests: true });
I think your work is great.
I was able to run the manual test and liked what you did.
But when I try to run the wdio test-runner, while standalone Selenium Server
is up and running, and wdio.conf.js has the plugin registered:
plugins: {
webdriverajax:{}
},
I run 'node_modules/.bin/wdio wdio.conf.js'
and get "ERROR: browser.url(...).setupInterceptor is not a function".
Any help is appreciated.
5.11.5
to 5.11.6
.This version is covered by your current version range and after updating it in your project the build failed.
webdriverio is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 9 commits.
8a10ff7
v5.11.6
ed3d504
Print link to Sauce Labs job details page when using Sauce Conn… (#4204)
25b4463
clean up setTimeout implementation (#4211)
f63ca53
Fix type for webdriverio onPrepare parameter (#4189)
afcb6c4
Updated selectors documentation for element ID (#4117)
2b793f8
Print data tables in spec reporter (#4201)
88e4960
Fix overflow text is displayed (#4202)
75c2223
updated missing patch in changelog
05c049c
update changelog
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
The current implementation only hooks into the XMLHttpRequest
object. Newer browsers have yet another way of doing XHR and that is the fetch API, which doesn't use the old XHR methods internally. So we need to intercept this new API as well.
Hi,
I'm using getRequests() to validate some requests with specific params but sometimes, promise does not grab what I want.
Sample:
browser
.setupInterceptor()
.click(id)
.pause(1000)
.getRequests().then(function(requests){ // tests }
Even with a larger pause, requests lacks.
Inspecting my front-end site, all requests are made quickly. At a blink of an eye.
Do you have any idea ?
5.4.20
to 5.6.0
.This version is covered by your current version range and after updating it in your project the build failed.
@wdio/mocha-framework is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 9 commits.
00bdd48
v5.6.0
e409aea
update package list in readme (#3590)
c36d1f7
typescript promise commands (#3577)
792f089
Adding outputDir to standalone (#3583)
9e03559
webdriverio: extend wait command prefixes (#3548)
422387e
v5.5.0
35ad8aa
make metrics param in assertPerformance not required (#3587)
2d01c70
Move reporter directory creation up (#3578)
afcec30
webdriverio: shadow$ and shadow$$ commands (#3586)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Hi Cris,
Thanks for making this package, i'm currently trying to intercept my request payload, but i realized this tool only verifies detailed body on the response, not on the request. Can you give me some idea how I can do this? Thanks
5.5.0
to 5.6.0
.This version is covered by your current version range and after updating it in your project the build failed.
@wdio/cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
00bdd48
v5.6.0
e409aea
update package list in readme (#3590)
c36d1f7
typescript promise commands (#3577)
792f089
Adding outputDir to standalone (#3583)
9e03559
webdriverio: extend wait command prefixes (#3548)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Hi, I am trying to use interceptor. Using chrome 83.0.4103.106.
browser.setupInterceptor();
...
browser.url(oDataUrl); //this request goes through fine and also getting the response.
browser.pause(5000);
..
var irequest = browser.getRequest(0); //but this request fails
Getting error here "Could not find request with index 0". getRequests() returns an empty array. Am I missing something. Kindly help.
Thanks
It would be nice to have a sample code for how to call browser.getRequests()
When I tried, it said the return value is not an array.
5.11.0
to 5.11.6
.This version is covered by your current version range and after updating it in your project the build failed.
@wdio/spec-reporter is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 43 commits.
8a10ff7
v5.11.6
ed3d504
Print link to Sauce Labs job details page when using Sauce Conn… (#4204)
25b4463
clean up setTimeout implementation (#4211)
f63ca53
Fix type for webdriverio onPrepare parameter (#4189)
afcb6c4
Updated selectors documentation for element ID (#4117)
2b793f8
Print data tables in spec reporter (#4201)
88e4960
Fix overflow text is displayed (#4202)
75c2223
updated missing patch in changelog
05c049c
update changelog
407a5d1
v5.11.5
6e20f6a
isSauce should not depend on hostname (#4194)
fd1bfd2
webdriver: support rebinding of context when invoking origFn in… (#4186)
6e72209
update changelog
2f94009
v5.11.4
be3d341
add --no-ci
There are 43 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
5.7.13
to 5.8.0
.This version is covered by your current version range and after updating it in your project the build failed.
@wdio/sync is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 30 commits.
ae1004c
v5.8.0
3e59cee
minor wording
43e69c6
blog: add blog for react selector command (#3900)
8f57958
wdio-sync: bump fibers version to 4 (#3898)
c52193d
junit-reporter: fix log file names (#3892)
27725a9
Fix unit tests when contributing on Windows 10 (#3891)
f715a76
fix appium protocols (#3886)
9a16bf3
add docker service to cli wizard supported services
27b8c86
Update JenkinsIntegration.md (#3885)
45962bc
wdio-local-runner: unpipe streams in the end (#3882)
6e5d2a0
apply wdioLogLevel before starting workers (#3872)
cdb2856
Fix headless endpoint (#3876)
57f3e8e
Don't fail element command in IE (#3874)
d006047
Fixes to react$ and react$$ scripts (#3862)
78ca355
wdio-logger: fix setting log level for subloggers and docs (#3871)
There are 30 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
5.7.15
to 5.8.0
.This version is covered by your current version range and after updating it in your project the build failed.
@wdio/local-runner is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 20 commits.
ae1004c
v5.8.0
3e59cee
minor wording
43e69c6
blog: add blog for react selector command (#3900)
8f57958
wdio-sync: bump fibers version to 4 (#3898)
c52193d
junit-reporter: fix log file names (#3892)
27725a9
Fix unit tests when contributing on Windows 10 (#3891)
f715a76
fix appium protocols (#3886)
9a16bf3
add docker service to cli wizard supported services
27b8c86
Update JenkinsIntegration.md (#3885)
45962bc
wdio-local-runner: unpipe streams in the end (#3882)
6e5d2a0
apply wdioLogLevel before starting workers (#3872)
cdb2856
Fix headless endpoint (#3876)
57f3e8e
Don't fail element command in IE (#3874)
d006047
Fixes to react$ and react$$ scripts (#3862)
78ca355
wdio-logger: fix setting log level for subloggers and docs (#3871)
There are 20 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Installed this plugin(3.0.0-beta.1) with webdriverio(4.6) and tried to access the XHR requests but getting empty response array
browser.setupInterceptor();
browser.click('//div[@class="src-containers-App-App-appContent"]/div/div/button');
browser.pause(1000);
var request = browser.getRequests();
console.log(request); //we are getting empty requests
I think this will be the issue - any workaround for this
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didn’t already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
It doesn't look like I'm able to intercept a downloaded file request. Is that possible? If not, it might make for a good feature.
Hi
I am failed to integrate this in my project. Can someone have any example ? I am following the README but failed to start this.
getting below error
browser.setupInterceptor is not a function
"wdio-intercept-service": "^4.0.0", "webdriverajax": "^2.2.0", "webdriverio": "^5.18.7"
I have a simple test I'm using to try to test the intercept service. Thus far I've based it on the example here: https://webdriver.io/docs/wdio-intercept-service.html
describe('Test Intercept Service', () => {
it('Intercept test', () => {
browser.url('http://google.com');
browser.setupInterceptor();
var requests = browser.getRequests();
console.log(requests);
})
})
When I run the test, I get this error: browser.setupInterceptor is not a function
I've done the best basic troubleshooting I can, as I'm fairly new to JS and WDIO. I've made sure it's using the right version of node, done a yarn install again and tried a few different combinations including putting it in a a browser.call statement.
How can i integrate this with my current gulp setup?
conf:
const Launcher = require('webdriverio/build/lib/launcher');
const path = require('path');
var wdajax = require('webdriverajax');
const wdio = new Launcher(path.join(__dirname, 'wdio.conf.js'));
...
gulp.task('e2e', () => {
wdajax.init(wdio);
return wdio.run(code => {
process.exit(code);
}, error => {
console.error('Launcher failed to start the test', error.stacktrace);
process.exit(1);
});
});
I got this error:
[17:56:58] Using gulpfile ~/projects/adTag2/gulpfile.js
[17:56:58] Starting 'e2e'...
[17:56:58] 'e2e' errored after 397 μs
[17:56:58] Error: you can't use WebdriverAjax with this version of WebdriverIO
at Object.plugin [as init] (/Users/marco/projects/adTag2/node_modules/webdriverajax/index.js:11:15)
at Gulp.gulp.task (/Users/marco/projects/adTag2/gulpfile.js:170:10)
at module.exports (/Users/marco/projects/adTag2/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/marco/projects/adTag2/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/marco/projects/adTag2/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/Users/marco/projects/adTag2/node_modules/orchestrator/index.js:134:8)
at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:592:11)
Although my version is higher than v3
Hello,
I need to intercept Grahpql requests to my tests, but this is fetch type, so the Intercept service isn't getting the request, is there any way to intercept this request?
the request is returning the result of this way
data: {values: {totalPages: 10,…}},…} data: {values: {totalPages: 10,…}} values: {totalPages: 10,…}
Thank You.
Nowadays I try to use WebDriverIO V4 and wdio-intercept-service to do some web auto test. I noticed that WebDriverIO V4 only support wdio-intercept-service V2.x but i can not find the V2.x in official npm registry. Cound you please upload some 2.x version to it ? Thanks a lot, appreciate!
This line overrides the url field if an init
object was passed to the fetch function:
https://github.com/chmanie/wdio-intercept-service/blame/master/lib/interceptor.js#L53
According to docs the init.url
option doesn't exist:
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch
It looks to me the line overriding the url should be removed. With current state, I cannot get accessed URLs when using the browser.getRequests()
function.
5.7.15
to 5.8.0
.This version is covered by your current version range and after updating it in your project the build failed.
@wdio/cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 20 commits.
ae1004c
v5.8.0
3e59cee
minor wording
43e69c6
blog: add blog for react selector command (#3900)
8f57958
wdio-sync: bump fibers version to 4 (#3898)
c52193d
junit-reporter: fix log file names (#3892)
27725a9
Fix unit tests when contributing on Windows 10 (#3891)
f715a76
fix appium protocols (#3886)
9a16bf3
add docker service to cli wizard supported services
27b8c86
Update JenkinsIntegration.md (#3885)
45962bc
wdio-local-runner: unpipe streams in the end (#3882)
6e5d2a0
apply wdioLogLevel before starting workers (#3872)
cdb2856
Fix headless endpoint (#3876)
57f3e8e
Don't fail element command in IE (#3874)
d006047
Fixes to react$ and react$$ scripts (#3862)
78ca355
wdio-logger: fix setting log level for subloggers and docs (#3871)
There are 20 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
When using the sequence:
browser.url(url);
browser.setupInterceptor();
would it miss the first network call, if it happens quickly.
Is there a way to put in setupInterceptor before opening the url?
Is there a way to persist the network calls after navigating to a new page?
I am doing a network call in the 'beforeunload' event and I want to check this call. But it is already in the new page and shows a count of zero.
5.7.9
to 5.7.12
.This version is covered by your current version range and after updating it in your project the build failed.
webdriverio is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 15 commits.
c714129
v5.7.12
2379d23
Ensure ms edge runs on w3c on Sauce (#3832)
f46c0fe
wdio-cli: fix typo (#3828)
4705847
fix addCommand in multiremote (#3825)
19f2ff0
fix element property
52d4c9d
update video on front page
849101a
v5.7.11
9351be3
Issue 3416: Support multiple errors in the Allure-reporter (#3746)
217db81
Allow junit-reporter to work when a runner has multiple spec files per runner (#3818)
3668cc9
allure-reporter: fix allure endStep and startStep (#3821)
3e5f7c5
Add a couple features to boilerplate project (#3822)
6fd8b41
add missing setup step
7d32f2d
v5.7.10
a182d96
wdio-cli: Print reporters after stdout (#3817)
8756c00
install compass before deploying docs
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
5.4.20
to 5.6.0
.This version is covered by your current version range and after updating it in your project the build failed.
@wdio/sync is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 9 commits.
00bdd48
v5.6.0
e409aea
update package list in readme (#3590)
c36d1f7
typescript promise commands (#3577)
792f089
Adding outputDir to standalone (#3583)
9e03559
webdriverio: extend wait command prefixes (#3548)
422387e
v5.5.0
35ad8aa
make metrics param in assertPerformance not required (#3587)
2d01c70
Move reporter directory creation up (#3578)
afcec30
webdriverio: shadow$ and shadow$$ commands (#3586)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
As seen in #1, the assessed request data does not survive a page change. This could be solved be using cookies or localStorage (depending on browser support).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.