0

I want to open any url in firefox browser but it does not open. what should I do?

I installed firefox 47. I put in my code here.

public class Baseclass {
public static WebDriver driver;
public static WebDriver OpenBrowser(){
    String browsername="firefox";
    String url="https://www.healthcarevalunteer.com";
    if(browsername.equalsIgnoreCase("firefox")){
        driver=new FirefoxDriver();
        // Create the Selenium implementation
        Selenium selenium = new WebDriverBackedSelenium(driver, url);

        // Perform actions with selenium
        selenium.open("http://www.google.com");

        driver.get(url);

1 Answer 1

1

If you are not migrating RC tests to WebDriver you don't need the WebDriverBackedSelenium.

This should work as you expect:

    final String url = "https://www.healthcarevalunteer.com";
    final RemoteWebDriver driver = new FirefoxDriver();
    driver.get(url);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.