This question is for the UISpec4J testing framework, for testing Java GUIs...
I'm trying to test an error message pop-up window (modal) that results from making a selection from a ComboBox, but I'm not sure how to return a Trigger object from the select action.
Here's a snippet:
WindowInterceptor
.init(window.getComboBox("ComboBoxName").select("Choice that will cause error message")) // Problem here
.process(new WindowHandler() {
public Trigger process(Window errorMessage) {
// Do stuff...
}
})
.run();
In the .init()
line, I'm supposed to return a Trigger object (like button.triggerClick()
), but I don't know how to do that from a ComboBox selection.
Can someone please tell me how to return a trigger from a ComboBox selection?
Thanks for any help!