Andreas Johansson Andreas Johansson - 1 year ago 106
Java Question

Vaadin - Trigger button click within table

In Vaadin, is it possible to simulate the click of a button which is located within a Table?


table.getCellContent(tableRowId, columnRowId).clickButton()

The reason that I'm asking is since I need this for testing purposes.

Answer Source

The following works in Vaadin 6.8.0 and later versions:

((Button) table.getContainerProperty(tableRowId, columnRowId).getValue()).click();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download