I wondered if it was possible to get access to a variable which is served in JS by the page which I'm testing.
Website serves Javascript:
var varyingUrl = 'www.google.com';
A cypress test
Cypress.Commands.add('closeAccount', () => {
var url = varyingUrl;
cy.request(url)
})
I'm almost certain this isn't possible but I thought I'd ask in case someone has found a way to gain access to these available javascript variables available to the dom using cypress