I'm not an expert in selenium, but I believe I may have uncovered a bug when attempting to use jQuery v2.0.2. When I use jQuery v2.0.2 with my Play Framework 2.2.1 application, instead of the bundled jQuery v.1.9.0, I get the following error when I run "play test":
[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)
I was able to recreate this error by creating a brand new Play Java project using "play new tmp". After creating the project I was able to "play test" just fine. I then copied jquery-2.0.2.min.js into the public/javascripts folder. I then updated the main.scala.html file to use jquery-2.0.2.min.js instead of the bundled jquery-1.9.0.min.js. That was enough to cause this exact error again by running "play test".
I also tried using the FIREFOX WebDriver helper class but again, no luck.
Any insight into how we can get Selenium / Fluentlenium work with the 2.0.2 version of jQuery would be greatly appreciated :) thanks!