The driver executable must exist

Viewed 51
import org.openqa.selenium.WebDriver;
import org.openqa selenium.chrome.ChromeDriver;
    
public class SeliniumTest {
    public static void main(String [] args) {
    
    System.setProperty("webdriver.chrome.driver", chromedriver.exe");
    
    WebDriver driver = new Chrome driver();
    
    driver.get("https://www.google.com");
    
        enter code here
    
    }
}

When I run this, I get an illegal Exception:

the driver executable must exist: c:\TestProject\drivers\chromedriver.exe

I tried multiple times to install the IDE and download the right version of drivers on both Mac and Windows, but I get the same error. Can someone please help?

0 Answers
Related