I am trying to write Selenium Tests using WithBrowser
class of the PlayFramework 2.5.
Something like this:
public class BrowserFunctionalTest extends WithBrowser {
@Test
public void runInBrowser() {
browser.goTo("/");
assertNotNull(browser.$("title").getText());
}
}
However, I want to be able to set custom Error Handlers for at least CSS errors, since they spam my console. And since they come from boostrap I cannot get rid of them.
I tried to set the loglevel of the logger like this:
java.util.logging.Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(java.util.logging.Level.SEVERE);
System.getProperties().put("org.apache.commons.logging.simplelog.defaultlog", "fatal");
Fluentlenium documentation tells me to override the getDefaultDriver
method, but that does not seem to be applicable here. And I cannot get my hands on the WebClient directly, since there is no getter for the field.