I want to use selenium with chromedriver on Mac,but I have some troubles on it.
For sake of simplicity:
Download the chrome webdriver from this link. Copy the 'chromedriver' in the folder of python script.
from selenium import webdriver
import os
url = 'http://www.webscrapingfordatascience.com/complexjavascript/'
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
DRIVER_BIN = os.path.join(PROJECT_ROOT, "chromedriver")
driver = webdriver.Chrome(executable_path = DRIVER_BIN)
driver.get(url)
input('Press ENTER to close the automated browser')
driver.quit()