Open KatriHaapalinna opened 6 years ago
Sounds like multiple Selenium versions on the classpath
I can confirm this issue, also for the recently released final TestBench 5.1.0 Version (we try to use it together with Vaadin 8.1.6)
java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;
at com.vaadin.testbench.elements.NotificationElement.close(NotificationElement.java:41)
at ch.concordia.fachtest.cockpit.webapp.guitests.pageobjects.RootPageObject.lambda$closeAllNotifications$1(RootPageObject.java:62)
at java.util.ArrayList.forEach(ArrayList.java:1257)
...
I don't have multiple selenium versions in my classpath. I cleaned up my gradle dependencies to have only selenium 3.4.0 in my classpath.
Looking at the code I see NotificationElement
is from vaadin-testbench-api-8.1.6.jar
.
And as far as I know, Vaadin 8.1.6 is "compiled against" TestBench 5.0.0 which uses Selenium 2.53.1. And looking at the code of selenium-support
2.53.1 and 3.4.0, I see the breaking change in the signature of WebDriverWait#until
.
So this makes some kind of sense for me... But how to resolve this? Do we need a new Vaadin 8.1.x version using TestBench 5.1.0 @Artur- ? Or do we need to wait for / and upgrade to Vaadin 8.2.0 in order to be able to use Vaadin TestBench 5.1.0? What is/should be the compatibility of Vaadin TestBench 5.1.0?
Hi @Petikoch,
You're completely right about vaadin-testbench-api
for 8.1 or lower being is "compiled against" TestBench 5.0.0 which uses older Selenium (3.0.1).
We have fixed this in 8.2 which is now in beta, you can test now with vaadin-testbench-api
8.2.0.beta1
in vaadin-prereleases, but because it's a breaking change in API I don't think we can release vaadin-testbench-api
8.1.x compatible with vaadin-testbench
5.1.0.
Also, I'd need to check before confirming, but it's most probably safe to use vaadin-testbench-api
8.2 with framework 8.1
Calling close() on NotificationElement results in NoSuchMethodError for org.openqa.selenium.support.ui.WebDriverWait.until(...
Setup: OS: Win 10 TestBench: 5.1.0,alpha1 or higher Browser: Chrome 61.x Driver: ChromeDriver 2.33.x Java: jdk 1.8
Reproducible by minimal example attached. testbench_error_example.zip