HTMLUNIT Driver : The data necessary to complete this operation is not yet available HTMLUNIT Driver : The data necessary to complete this operation is not yet available selenium selenium

HTMLUNIT Driver : The data necessary to complete this operation is not yet available


Ok, I found the solution. You need to do 2 things. Change the code - the samples dont seem to work, but also you do need to install the selenium driver otherwise it doesnt install the plugin for the web browser. To do that add this to your build config:

      "org.seleniumhq.selenium" % "selenium-java" % "2.31.0"

As per this discussion here: https://groups.google.com/forum/?fromgroups=#!searchin/play-framework/browser$20tests/play-framework/AlJwpRfyXv0/Ry8Jsxj8mCcJ

Then, some code like this will work:

package Seleniumimport org.specs2.mutable._import play.api.test._import play.api.test.Helpers._class SeleniumTest extends Specification {  val app = FakeApplication()  "Application" should {    "works from within a browser" in new WithBrowser(webDriver = Helpers.FIREFOX, app = app) {      running(FakeApplication()) {        browser.goTo("/")        //browser.$("#title").getTexts().get(0) must equalTo("Welcome")        browser.waitUntil[Boolean]{          browser.pageSource contains ("Welcome")        }        //info(browser.$("#title").toString)      }    }  }}

Its pretty sad that this isn't documented better.