I am trying to test an Play 2 app with Fluentlenium.
This is the code for one of the test cases:
import org.junit.*;
import play.mvc.*;
import play.test.*;
import play.libs.F.*;
import static play.test.Helpers.*;
import static org.fest.assertions.Assertions.*;
import static org.fluentlenium.core.filter.FilterConstructor.*;
public class IntegrationTest {
/**
* Verify if the Login Page is rendered correctly
*/
@Test
public void LoginPage() {
running(testServer(3333, fakeApplication(inMemoryDatabase())), HTMLUNIT_, new Callback<TestBrowser>() {
public void invoke(TestBrowser browser) {
browser.goTo("http://localhost:3333");
assertThat(browser.pageSource()).contains("Login");
}
});
}
When I execute this using HTMLUNIT it works fine, but there are some pages with complex javascript so HTMLUNIT brokes on some test cases.
When I replace HTMLUNIT with FIREFOX it launches Firefox but doesn't do anything on the browser.
And when I try to use CHROME it gives me an "Cannot find symbol" compilation error. I tried downloading the ChromeWebDriver and copying it in "/usr/bin" folder, but still doesn't work.
I don't know where could be the problem.