2017-04-10

Install Chromedriver on MacOS

1. Download chromedriver
https://sites.google.com/a/chromium.org/chromedriver/


2. Add following code to your Java class at the begining.

//Check your system info
String os = System.getProperty("os.name").toLowerCase();

//Load different driver for different OS
if (os.contains("mac")){
    System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir")+"/chromedriver");
}else{
    System.setProperty("webdriver.chrome.driver",     System.getProperty("user.dir")+"\\chromedriver.exe");
}

No comments:

Post a Comment

Setup VNC on Ubuntu 20.04

  sudo apt update sudo apt install xfce4 xfce4-goodies sudo apt install tigervnc-standalone-server sudo apt install tightvncserver vncserver...