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

312 Views Asked by At

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 be 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

1

There are 1 best solutions below