Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can HTMLUnit enter data in password fields?

Tags:

java

html

testing

My HTMLUnit tests are failing, and I've got a feeling it's because I'm entering a password using the setValueAttribute() method and that for some reason doesn't work. Any ideas? Am I supposed to pass HTMLUnit the encrypted form of the password?

EDIT:

The code to set the pass:

loginForm.getInputByName("loginPassword").setValueAttribute("1234");

like image 840
Mike Avatar asked Jun 19 '26 11:06

Mike


1 Answers

This should work, can you please submit a test case to HtmlUnit user-list, so we investigate further?

Yours, Ahmed Ashour http://asashour.blogspot.com/


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!