I am doing some integration tests with vaadin version 7.6.4 and Testbench (4.0.3).
I have a view with several comboboxes. One of them has this property comboBox.setTextInputAllowed(false);. For testing purposes, I want to change the default value in combobox, and I need to select another element, and then the default.
To select an item, I tried the following code:
$(ComboBoxElement.class).selectByText("ElementName");
But it only works when comboBox.setTextInputAllowed(true);
I also tried using sendkeys()to change the selected value:
$(ComboBoxElement.class).openPopup();
$(ComboBoxElement.class).sendKeys(keys.ARROW_DOWN);
$(ComboBoxElement.class).endKeys(Keys.ENTER);
This code opens the comboBox popup correctly, but does not select any item. If I have not set focus using setFocus();
-, , , combobox setTextInputAllowed(false)?.