Package com.vaadin.testbench.unit
Interface Clickable<T extends Component>
- Type Parameters:
T- the type of component being tested
- All Known Implementing Classes:
AbstractLoginTester,AccordionTester,AnchorTester,ButtonTester,ChartTester,CheckboxGroupTester,CheckboxTester,ComboBoxTester,ComponentTester,ConfirmDialogTester,ContextMenuTester,DatePickerTester,DateTimePickerTester,DescriptionListTester,DetailsTester,DialogTester,DivTester,EmphasisTester,GridTester,H1Tester,H2Tester,H3Tester,H4Tester,H5Tester,H6Tester,HrTester,HtmlClickContainer,HtmlComponentTester,HtmlContainerTester,ImageTester,InputTester,ListBoxTester,ListItemTester,LoginFormTester,LoginOverlayTester,MenuBarTester,MessageInputTester,MessageListTester,MultiSelectComboBoxTester,MultiSelectListBoxTester,NativeButtonTester,NativeDetailsTester,NativeLabelTester,NotificationTester,NumberFieldTester,OrderedListTester,ParagraphTester,PreTester,RadioButtonGroupTester,RadioButtonTester,RangeInputTester,RouterLinkTester,SelectTester,SideNavTester,SpanTester,TabSheetTester,TabsTester,TextAreaTester,TextFieldTester,TimePickerTester,UnorderedListTester,UploadTester,VirtualListTester
public interface Clickable<T extends Component>
Mixin interface for component testers that support click simulation.
This interface provides default implementations for various click operations
including left, middle, and right clicks with optional meta keys.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclick()If the component is usable send click to component as if it was from the client.default voidPerforms a click with the specified button and meta keys.default voidIf the component is usable send click to component as if it was from the client with defined meta keys pressed.voidEnsures the component is in a usable state before interaction.Gets the component being tested.default voidClick with middle button.default voidmiddleClick(MetaKeys metaKeys) Click with middle button and given meta keys.default voidClick with right button.default voidrightClick(MetaKeys metaKeys) Click with right button and given meta keys.
-
Method Details
-
getComponent
T getComponent()Gets the component being tested.- Returns:
- the component under test
-
ensureComponentIsUsable
void ensureComponentIsUsable()Ensures the component is in a usable state before interaction. -
click
default void click()If the component is usable send click to component as if it was from the client. -
click
If the component is usable send click to component as if it was from the client with defined meta keys pressed.- Parameters:
metaKeys- the meta keys pressed during click
-
middleClick
default void middleClick()Click with middle button. -
middleClick
Click with middle button and given meta keys.- Parameters:
metaKeys- the meta keys pressed during click
-
rightClick
default void rightClick()Click with right button. -
rightClick
Click with right button and given meta keys.- Parameters:
metaKeys- the meta keys pressed during click
-
click
Performs a click with the specified button and meta keys.- Parameters:
button- the mouse button (0=left, 1=middle, 2=right)metaKeys- the meta keys pressed during click
-