-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting AbstractMethodError
in org.fluentlenium.core.events.EventAdapter.beforeChangeValueOf
#457
Comments
Can you paste the output of |
That appears to be true:
Looks like it's 2.53.1 |
It seems something's gone wrong with 3.1.0 release :( it's a bug. |
I can't understand why it's resolved to 2.53.1 ... pom of fluentlenium-parent declares selenium.version to 3.0.0 ... |
When I remove the Spring Boot Parent, it pulls in the correct version of selenium. So when I remove: <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent> Then I get this:
|
I've fixed your code and it is passing now. It is an issue related to pom.xml |
Spring boot parent pom declares a selenium.version property to 2.53.1, like the one defined in fluentlenium parent pom. To solve this conflict you have to add the property to the effective selenium version to use in fluentlenium : 3.0.1.
But there's another issue with htmlunit driver then ... |
or remove parent reference from pom and set dependencies to:
|
@zilkey is it anything we can help you in terms of reported issue or we can close this one? |
You can close this. Thank you for the quick response! I'm still trying to figure out how to keep the spring boot parent and also get the right versions lined up, but this was super helpful. Thanks! |
@zilkey thank you! |
For future folks googling, here's a working pom.xml that includes the pom.xml generated by start.spring.io (with the parent) as well as a working selenium and HTMLUnit setup: <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<!-- Parent shipped with start.spring.io -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<!-- I needed to add this -->
<selenium.version>3.0.1</selenium.version>
</properties>
<dependencies>
<!-- These shipped with start.spring.io -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- These were copied from fluentlenium docs -->
<dependency>
<groupId>org.fluentlenium</groupId>
<artifactId>fluentlenium-junit</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.fluentlenium</groupId>
<artifactId>fluentlenium-assertj</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
<version>2.23.2</version>
<scope>test</scope>
</dependency>
<!-- jetty websocket is currently required by htmlunit-driver -->
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-api</artifactId>
<version>9.3.5.v20151012</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-client</artifactId>
<version>9.3.5.v20151012</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
<scope>test</scope>
</dependency>
<!-- I needed to add this -->
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.23</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> I just needed to add: <dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.23</version>
<scope>test</scope>
</dependency> For those who encounter this in the future once the specific versions have changed, here was the process:
Thanks again @Toilal and @filipcynarski for the tips on how to fix this. |
I was getting the same error today. The solution above didn't work for me. Instead I had to exclude <dependency>
<groupId>org.fluentlenium</groupId>
<artifactId>fluentlenium-junit</artifactId>
<version>3.1.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>selenium-support</artifactId>
<groupId>org.seleniumhq.selenium</groupId>
</exclusion>
</exclusions>
</dependency> and force it to: <dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>3.0.1</version>
</dependency> |
I can't get Fluentlenium to work with an app that uses Spring Boot.
(Please forgive me if this is not the correct place to submit this bug/question, but since the exception is being thrown from FluentLenium I thought I'd start here).
Steps to reproduce
windows
towindow
)mvn clean test
I've pushed an app with this bug here:
https://github.com/zilkey/spring-fluentlenium-abstract-method-example
Expected behavior
I expected the test to pass.
Actual Behavior
And the (very long) output is here
When I debug I see that
org.fluentlenium.core.events.EventAdapter
is being fired, butbeforeChangeValueOf
is never called.Any pointers on where to look next?
Other things I've tried
Since this seems like a dependency issue I tried to isolate the dependencies that are causing the error. It appears to be
spring-boot-starter-parent
that's causing the conflict, as this minimal pom.xml file will reproduce the error:Any thoughts or pointers?
The text was updated successfully, but these errors were encountered: