I have a view with a Calendar
. To this component I have added some events which can be clicked and trigger some code by handlig the EventClick
event with EventClickHandler()
.
I am trying to test those events from Vaadin via Vaadin Testbench (4.0.3). Using TestBenchTestCase
's method findElement() as follows :
public WebElement getCalendarElement(){
return findElement(By.className("v-calendar-event"));
}
I retrieve the event element correctly, but when .click()
method over the element is invoked, there's not EventClick arising.
I also tried using as suggested here :
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", getCalendarElement());
for the click function and neither id it work. How can I get Testbench to click the element?