I need to get the value of an <input>
, specifically the stuff that is held inside its value attribute.
However, the input
is not visible, so that seems to be a problem for testcafé.
Does anyone know how to work around that? Is there a special option you can use with the Selectors
to make it work?
Thanks for helping me out, I appreciate any help!
Got it, simply declare a Selector like this
let yourInputs = Selector('input[type="hidden"]')
, this will get all hiddeninputs
and return a NodeList which you can iterate over in your test.If you want to be more specific and select over an ID or name, do it like @lumio.
Then you can access the value in your test run with an
await yourInputs.value
.