Hi,
I'm having a n00b problem overriding getDefaultDriver(), hoping someone could help me.
In my test project I have two important classes:
- FluentTestBase extends org.fluentlenium.adapter.FluentTest
- AbstractPage extends org.fluentlenium.core.FluentPage
The idea is to let every test extend FluentTestBase (to get common behaviour like properties like @SharedDriver, driver settings etc.), while every page object extends AbstractPage to get common page objects (like site navigation, site URL etc.)
Now I want to be able to control which driver is used, which by the documentation
https://github.com/FluentLenium/FluentLenium#driver is achieved by overriding getDefaultDriver() in the test. Hence I did this in my base test class, FluentTestBase (I've taken away details for clarity):
public class FluentTestBase extends FluentTest {
...
@Override
public final WebDriver getDefaultDriver() {
return new ChromeDriver();
}
...
}
The strange thing is that when my test boots up I FIRST get a empty Firefox window after which a Chrome window appears. The tests are all run in Chrome, which then closes. The Firefox window is still open and the test execution never finishes until I close the Firefox window manually.
Can anyone please point me in the direction of a solution to this problem?
Regards,
Johan Rydström