Reputation: 71
I am having issues trying to get my Fluentlenium code to run inside the WebDriver Firefox Driver. I need Fluentlenium to execute inside the WebDriver Firefox Driver instead of opening it's own browser. I think I need to override this but I am not exactly sure how to do this. Any help would greatly appreciated. Thanks! Here is what I have for code:
WebDriver driver = new FirefoxDriver();
@Test
public void create_a_picklist()
{
// Go to Page
goTo("http://www.google.com");
}
What happens is that it opens two browsers. One is from the Firefox Driver and the other must be the default browser from the goTo from Fluentlenium. I need it to run this code inside the Firefox Driver window and not open it's own window from Fluentlenium.
Upvotes: 1
Views: 1423
Reputation: 98
By default, it launchs a Firefox browser so that's sufficient :
public class Test extends FluentTest {
@Test
public void go_to_google()
{
goTo("http://www.google.com");
}
}
And nothing more :)
Upvotes: 1
Reputation: 71
Ok. Looks like I figured it out. Here is what I did to override the browser:
public class Test extends FluentTest {
// Defines the Driver
public WebDriver driver = new FirefoxDriver();
// Overrides the default driver
@Override
public WebDriver getDefaultDriver() {
return driver;
}
@Test
public void go_to_google()
{
goTo("http://www.google.com");
}
}
Upvotes: 0