Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (29.3k points)

I'm having trouble with my project on the selenium.I cant seem to get rid of the red lines -> WebDriver Driver = new ChromeDriver();

I added the Jar files but the red lines wont go away. I need help please im stuck i cant move forward.

package WebDriver_Basic;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Launch {

public static void main(String[] args) {

System.setProperty("webdriver.chrome.driver", "C:\\Users\\alfri\\Downloads\\AllDrivers\\chromedriver");
WebDriver driver = new ChromeDriver();

1 Answer

0 votes
by (50.2k points)

As you are not importing the chrome options that's the reason for the issue. Import the chrome options then that will resolve your issue.

 import org.openqa.selenium.chrome.ChromeDriver;

 import org.openqa.selenium.chrome.ChromeOptions;  

Browse Categories

...