Can HTMLUnit enter data into password fields?

My HTMLUnit tests fail, and I have the feeling because I entered the password using the setValueAttribute () method and for some reason does not work. Any ideas? Should I pass HTMLUnit an encrypted password form?

EDIT:

Code for setting the passage:

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

+3
source share
3 answers

This should work, can you send a test case to the list of HtmlUnit users, so we will further investigate?

Regards, Ahmed Ashur http://asashour.blogspot.com/

+1
source

. ( ). , Webdeveloper Firefox. . HtmlUnit, .

0

It works, I work.

I would check that you get the correct input field name. If not, can you send stacktrace.

The following code works for me. form.getInputByName ("password") setValueAttribute ("1234") ;.

0
source

Source: https://habr.com/ru/post/1709666/


All Articles