You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
The following code does not work ...
module.exports = {
'Listens and the Gets': function(browser) {
browser.listenXHR()
browser.url('https://www.yahoo.com')
browser.getXHR('yahoo', 5000, xhrs => {
// browser.waitForXHR('yahoo', 5000, '', xhrs => {
if (xhrs.length > 0) {
for (i = 0; i < xhrs.length; i++) {
console.log("\nMatch found:"
+ "\n\tURL: " + xhrs[i].url
+ "\n\tSTATUS: " + xhrs[i].status
+ "\n\tMETHOD: " + xhrs[i].method
+ "\n\tRESPONSE CODE: " + xhrs[i].httpResponseCode
)
}
} else {
console.log("No matching URLs found")
}
})
}
}
If I comment out the listenXHR and getXHR lines and uncomment the waitForXHR line then it works perfectly.
The text was updated successfully, but these errors were encountered: