开发者

Java HtmlUnit onchange event not fired

I use HtmlUnit to fill form. I have a select SELECT_A. After selecting option the additional elements must appe开发者_如何学Pythonar in the page. But it's not working! I simulate Firefox 3.6.

What do you think?

I tried to use NicelyResynchronizingAjaxController() but it does not help.


One note: fireEvent should be called with "change" parameter, not "onchange". Or fireEvent(Event.TYPE_CHANGE); is even better.


You can use the method fireevent("EventName") and pass eventname as a paramenter:

HtmlSelect fromselect = form.getSelectByName("droplist");
fromselect.fireEvent("onchange");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜