jeudi 26 novembre 2020

How to get the value of a

I'm trying to write a test that takes the amount value of a given element, and then manipulates it in the code. The code for the element is something like the following:

<input id="amount" type="text" value="16.95">

So how can I get the number value that's inside the "value" attribute?

I've tried to call the element like so:

const someVal = Selector('#amount').find('value')

But that's obviously wrong as it'd just take me to the element and not the data?

Aucun commentaire:

Enregistrer un commentaire