I am using htmlunit. How can I set a text input value if it does not have a value attribute?
<input type="text" onkeypress="test();" id="id" name="name" class="ttt">
I tried this but nothing
((HtmlTextInput) portfolios.getHtmlElementById("id")).setText("text");
((HtmlInput) portfolios.getHtmlElementById("id")).setTextContent("text");
((HtmlInput) portfolios.getHtmlElementById("id")).setAttribute("value", "text");
Please, help!
source
share