htmlunit java更改输入文本
我用它。 如果文本输入没有“value”属性,如何设置其值
<input type="text" onkeypress="test();" id="id" name="name" class="ttt">
我试过了,但什么都没有
((HtmlTextInput) portfolios.getHtmlElementById("id")).setText("text");
((HtmlInput) portfolios.getHtmlElementById("id")).setTextContent("text");
((HtmlInput) portfolios.getHtmlElementById("id")).setAttribute("value", "text");
请帮忙
# 1 楼答案
# 2 楼答案
{a1}有帮助吗