Webdriver Issue with Firefox

Download geckodriver and try the below code:

 

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.firefox.FirefoxDriver;

import org.openqa.selenium.remote.DesiredCapabilities;

import org.openqa.selenium.safari.SafariDriver;

import org.testng.annotations.Test;

public class GoogleTest {

  

@Test

  public void testHomePage() {

//System.setProperty(“webdriver.firefox.marionette”,”/Users/ashishsharda/Downloads/geckodriver“);

System.setProperty(“webdriver.gecko.driver”,“/Users/ashishsharda/Downloads/geckodriver”);

WebDriver driver = new FirefoxDriver();

    driver.get(http://www.facebook.com”);

        System.out.println(“Application title is “+driver.getTitle());

        driver.quit();

  }

}

Advertisements

About qainterviews

Software Geek,QA Expert,Blogger
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s