Copy Text From a Web Page Text Field Into a Variable


I'm struggling with a quite simple task:

On a HTML page (Chrome) there is a text field I like to copy the text into a variable and use it later.

<p class="form-field _billing_email_field ">
<label for="_billing_email">E-postadresse</label><input type="text" class="short" style="" name="_billing_email" I'd="_billing_email" value=“" placeholder=""> </p>

It’s the value “” I like to store in a variable.

I have tried all of the following:

Copy JS path:

Copy xpath:

Copy full xpath:

Writing to the same fields is no problem...

Best regards

"Whoever said that the definition of insanity is doing the same thing over and over again and expecting different results has obviously never had to reboot a computer."

Hey Lars,





If you try this the console of Safari or Google Chrome you can paste:

document.querySelector("#_billing_email").<-- Note the dot

When you type the dot, the editor will give you the available parameters.



1 Like

Thank you ccystone!

This worked:


Best regards

1 Like