Reputation: 1052
In route
we can specify the regex
or minimatch
string to capture any matching URLs', how can I get the matched URL completely?
Upvotes: 0
Views: 236
Reputation: 18
You can get it from xhr like this:
cy.route('/users/**').as('getPage');
cy.wait("@getPage").then((xhr) => {
url = xhr.url;
console.log('Matched url: ' + url);
});
Hope it helps :)
Upvotes: 1