I'm Getting error as soon as I Initialize driver = new ChromeDriver();

0 votes
below is my code.

package com.salesforce.pageobject;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

import org.testng.annotations.BeforeClass;

public class BaseClass {

// public String url =

// public String username =

// public String password =

public static WebDriver driver;

@BeforeClass

public void setup()

{

System.setProperty("webdriver.chrome.driver",System.getProperty("user.dir")+"//Drivers//chromedriver.exe");

    driver = new ChromeDriver();

}

I'm getting error at very first line (package com.salesforce.pageobject;) and driver = new ChromeDriver();

when I initiaize WebDriver means when I write driver = new ChromeDriver();

Error that I get at package com.salesforce.pageobject; is below

(The type org.openqa.selenium.remote.RemoteWebDriver cannot be resolved. It is indirectly referenced from required .class files)

for driver = new ChromeDriver(); it's Type mismatch: cannot convert from ChromeDriver to WebDriver
Aug 22 in Selenium by Prajwal Wakekar
50 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

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 in Selenium by anonymous
2,155 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How can I use HTML Unit Driver as a headless browser with Selenium?

Hello @Nishant, follow these steps to use ...READ MORE

answered May 17 in Selenium by Anvi
• 12,840 points
117 views
+1 vote
1 answer

Nightwatch chromedriver error

You should use a dot before lib: "webdriver.chrome.driver" ...READ MORE

answered Mar 25, 2018 in Selenium by nsv999
• 5,090 points
438 views
0 votes
1 answer

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,090 points
569 views
0 votes
1 answer
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,130 points
897 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
561 views