开发者

How can i select a value in dropdown list per JSFUnit?

开发者 https://www.devze.com 2023-01-01 22:58 出处:网络
I would like to change a value in dropdown list (h:selectOneMenu) with id \"items\". The following causes error

I would like to change a value in dropdown list (h:selectOneMenu) with id "items".

The following causes error

client.setValue("items", "1");

java.lang.IllegalArgumentException: This method can not b开发者_JAVA技巧e used on components of type com.gargoylesoftware.htmlunit.html.HtmlSelect

I've tried:

client.getElement("items").setAttribute("value","1");

It causes no error and no effect as well.

Is there any possibility to solve it?

Thanx in advance


http://community.jboss.org/wiki/UsingselectcomponentsListboxRadioMenuetc

0

精彩评论

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

关注公众号