Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Example 'waitForFirstXHR Without Trigger' Does Not Work #51

Open
kretschmannj opened this issue Jun 1, 2020 · 2 comments
Open

Example 'waitForFirstXHR Without Trigger' Does Not Work #51

kretschmannj opened this issue Jun 1, 2020 · 2 comments

Comments

@kretschmannj
Copy link

Using the first example ...
module.exports = {
'Catch all XHRs': function (browser) {
browser
.url('https://www.google.com/')
.waitForFirstXHR('', 1000, null, function assertValues(xhr) {
browser.assert.equal(xhr.status, "success");
browser.assert.equal(xhr.method, "POST");
browser.assert.equal(xhr.requestData, "200");
browser.assert.equal(xhr.httpResponseCode, "200");
browser.assert.equal(xhr.responseData, "");
})
}
}
I get the error 'Error: Error while running "waitForFirstXHR" command: trigger should be a function'

@Pieras2
Copy link

Pieras2 commented Jun 1, 2020 via email

@kretschmannj
Copy link
Author

the 'With listenXHR / getXHR' also doesn't work as the 'delay' parameter is not optional and must be supplied otherwise you get the error ... TypeError: Error while running "execute" command: command.callback is not a function

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants