Codek
Codek

Reputation: 5164

How to run Selenium tests against Internet Explorer under Play?

We've got some good selenium tests running against Firefox with Play 2.1

http://www.playframework.com/documentation/api/2.0/scala/play/api/test/Helpers

However even though webdriver does support Internet Explorer, i dont see an IE helper. Is there any way around this?

Upvotes: 2

Views: 1448

Answers (1)

Aerus
Aerus

Reputation: 4380

Based on the Fluentlenium documentation, your test class should extend FluentTest. You can then simply override the getDefaultDriver() method to change the browser:

public class IntegrationTest extends FluentTest {

    @Override
    public WebDriver getDefaultDriver(){
        return new InternetExplorerDriver();
    }

}

You should be able to return any Selenium WebDriver in this method (only tested with IE and FF).

Upvotes: 1

Related Questions