I am not able to set chromedriver exe path on Mac OS | Selenium Forum
S
sajjad ali khurasani Posted on 19/02/2024

Please Help me out. I'm not able to set chrome driver exe on Mac OS. 

 

package Browser;

 

import java.sql.Driver;

 

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

import org.testng.annotations.Test;

 

public class LaunchBrowser {

 

@Test

public void TestApp() {

 

 

System.setProperty("Webdriver.Chrome.driver", "Users\\sajjadalikhurasani\\Desktop\\chromedriver.exe");

WebDriver driver = new ChromeDriver();

driver.get("https://google.co.in");

 

}

}

 

 


M
mdsapon Replied on 26/02/2024

in latest version of Webdriver, you don't have to use chromedriver path anymore, so delete below line and try: 

System.setProperty("Webdriver.Chrome.driver", "Users\\sajjadalikhurasani\\Desktop\\chromedriver.exe");