How should I configure the chromedriver exe in eclipse

0 votes

I have downloaded chromedriver.exe and eclipse, I have added through add external jars but while executing it gives me error

Error: Could not find or load main class demochrome.DemoChrome

package chromeD;

public class ChromeBrow {

    public static void main(String[] args) {

        System.setProperty("webdriver.chrome.driver", "E://chromedriver.exe");
        }

}
Mar 27, 2018 in Selenium by Johnathon
• 9,090 points
19,672 views

1 answer to this question.

0 votes

Use the page factory pattern, working example:

public class Demo{
String baseUrl = "http://google.com";
String driverPath= "C:\\chromedriver.exe";

WebDriver driver;

@BeforeTest
public void beforeTest() {
    System.setProperty("webdriver.chrome.driver", driverPath);
    driver  = new ChromeDriver();
}

and in @Test write

driver.get(baseUrl);
answered Mar 27, 2018 by ffdfd
• 5,550 points

Related Questions In Selenium

0 votes
0 answers

How to configure ChromeDriver to initiate the browser in the Headless mode using Selenium?

I'm currently working on a Python script ...READ MORE

Apr 2, 2019 in Selenium by Surya
• 970 points
1,856 views
+2 votes
2 answers

How can I press ENTER key with the execute_script in selenium python?

The below code containing Keys.ENTER might just ...READ MORE

answered Mar 28, 2018 in Selenium by nsv999
• 5,500 points
27,448 views
0 votes
1 answer

Where do I get the ChromeDriver.exe from? The download link isn't available

You can download the chromedriver.exe from this ...READ MORE

answered Apr 3, 2018 in Selenium by nsv999
• 5,500 points
15,628 views
0 votes
1 answer

How do i change the location where my file gets downloaded in Selenium Webdriver and firefox driver?

There are a couple of errors there. ...READ MORE

answered Apr 13, 2018 in Selenium by nsv999
• 5,500 points
6,282 views
0 votes
1 answer

I need to release the memeory allocated to Selenium chromedriver.exe while for tests

The usage of the commands is incorrect. driver.close() ...READ MORE

answered May 21, 2018 in Selenium by sniffy_god
• 780 points
6,787 views
+4 votes
1 answer

How can I configure Eclipse for using Selenium?

Follow the following steps to configure your ...READ MORE

answered Dec 12, 2018 in Selenium by Nabarupa
1,928 views
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,805 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,209 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,287 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,914 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