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

Unable to get waitForXHR to work with a trigger #58

Open
kretschmannj opened this issue Oct 9, 2020 · 0 comments
Open

Unable to get waitForXHR to work with a trigger #58

kretschmannj opened this issue Oct 9, 2020 · 0 comments

Comments

@kretschmannj
Copy link

kretschmannj commented Oct 9, 2020

I have successful examples of 'listenXHR', 'getXHR', waitForFirstXHR, waitForFirstXHR with a trigger and waitForXHR with no trigger. However, I'm unable to get waitForXHR to work with a trigger. Here's my code:

		// example of waitForXHR with a trigger - doesn't work - 0 results found
		browser.url("https://magellanrx.com/member/")
		browser.waitForXHR('', 5000, trigger => {
			browser.click('xpath', "//a[@class='btn-registration default-custom-button link-button']")
		}, xhrs => { // get all the XHRs
			console.log("\n** " + xhrs.length + " requests found **\n")
			// console.log('URL: ' + xhrs[0].url + '\n')
		})

Does anyone have a working example of waitForXHR with a trigger?

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

1 participant