'Cypress CAS authentications programmatically
I am trying to authenticate thru CAS. I try to add new command which uses multiple cy.request to authenticate. https://apereo.github.io/cas/6.2.x/protocol/CAS-Protocol.html
The first GET requests sends back a hidden input which has a a value attribute I need to send back in the body of the following POST request.
I am unable to parse the cy.request reponse object as an XML document is throws parse error exception.
const xml_doc = Cypress.$.parseXML(response.body)
Other way would be to parse parse as HTML, but this is just a mess for me. HTML doms as an array.
Is there any other way to parse HTML response so I can use selectors to extract an element attribute value?
like :
Or am I trying to do it on a wrong way? Do you have any experience?
I would like to do it with regexp as a last option :(
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
