我用htmlunit.如果没有属性'value',我如何设置文本输入的值?
<input type="text" onkeypress="test();" id="id" name="name" class="ttt">
Run Code Online (Sandbox Code Playgroud)
我尝试了这个,但没有
((HtmlTextInput) portfolios.getHtmlElementById("id")).setText("text");
((HtmlInput) portfolios.getHtmlElementById("id")).setTextContent("text");
((HtmlInput) portfolios.getHtmlElementById("id")).setAttribute("value", "text");
Run Code Online (Sandbox Code Playgroud)
请帮忙!