While I may not be a selenium expert, it seems that I've stumbled upon a bug when trying to utilize jQuery v2.0.2 with my Play Framework 2.2.1 application instead of the default jQuery v.1.9.0. Whenever I run "play test", I encounter the following error:
[error] Driver info: driver.version: HtmlUnitDriver
[error] at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:367)
[error] at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:346)
[error] at org.fluentlenium.core.Fluent.goTo(Fluent.java:228)
[error] at IntegrationTest$1.invoke(IntegrationTest.java:22)
[error] at IntegrationTest$1.invoke(IntegrationTest.java:20)
[error] at play.test.Helpers.running(Helpers.java:433)
[error] at IntegrationTest.test(IntegrationTest.java:20)
[error] ...
[error] Caused by: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function addEventListener in object [object HTMLDocument]. (http://localhost:3333/assets/javascripts/jquery-2.0.2.min.js#4)
To replicate this issue, I created a new Play Java project using "play new tmp". After setting up the project, I could successfully run "play test" without any errors. Then, I added jquery-2.0.2.min.js to the public/javascripts folder and updated the main.scala.html file to reference this version instead of jquery-1.9.0.min.js. This simple switch triggered the same error when running "play test".
Even attempting to use the FIREFOX WebDriver helper class didn't resolve the issue.
If anyone has suggestions on how to make Selenium / Fluentlenium compatible with jQuery version 2.0.2, I would greatly appreciate any insights! Thank you :)