System setProperty is not recogonized in Eclipse

0 votes
package demo;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver.SystemProperty;
import org.openqa.selenium.io.*;

public class one 
{
    System.setProperty("webdriver.chrome.driver","c:\\chromedriver\\chromedriver.exe");
    WebDriver driver = new ChromeDriver();
    driver.manage().window().maximize();
    driver.get("http://google.com");
}
Jan 22, 2019 in Selenium by anonymous
7,287 views
Can you please tell the complete error you are facing?

2 answers to this question.

0 votes
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class One {

    public static void main(String[] args)
    {
        System.setProperty("webdriver.chrome.driver", "C:\\Users\\priyaj_Kumar\\Downloads\\chromedriver.exe");
        WebDriver driver = new ChromeDriver();
        driver.get("https://www.google.com");

    }

}

This code works fine without any error. Your code is also similar so can you please tell more about your error?

answered Jan 22, 2019 by Priyaj
• 58,020 points
+1 vote
Try adding the selenium jar files to your package. It will work fine. That could be the most common error I can think of.
answered Feb 5, 2019 by Shashank
• 1,370 points
@Shashank yes that could be a probable reason. good observation
Thank you priyaj.

Related Questions In Selenium

0 votes
1 answer
0 votes
2 answers

Getting Error in System.setProperty of ChromeDriver

System.setProperty("webdriver.chrome.driver", ...READ MORE

answered Jan 8, 2019 in Selenium by anonymous
9,767 views
0 votes
2 answers

Check that the element is clickable or not in Selenium WebDriver

Hi , you want to know only is ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
34,244 views
0 votes
1 answer
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,762 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,184 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,258 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,895 views
0 votes
2 answers

What is the output of Usability Testing?

Usability testing = navigation + context testing. The ...READ MORE

answered Feb 15, 2019 in Selenium by Shashank
• 1,370 points
1,104 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP