![]() I’ve been working on some web crawling projects recently. As this is an open tool, you can download it from its official website or the Selenium community. exe file that your WebDriver interface uses to initiate the Google Chrome browser. The next step is to find the appropriate version of the ChromeDriver. In my first project, my chosen tools were python, selenium, and homebrew. We assume that you have already installed the Google Chrome browser. I doubt you need much of an introduction to python, selenium is a framework that facilitates browser automation. I won’t go into too much detail about selenium in this post in order to keep it short. Code documentation on selenium-python can be found here. Homebrew is a package manager that installs packages in their own directory and then symlinks them in “usr/local”. ![]() We can do this by running the following command on the terminal: pip install selenium You can learn more about homebrew and how to install it here. We do this by executing the following command on the terminal: brew cask install chromedriver Once we’ve installed selenium, it’s time to install the chromedriver using homebrew. When the installation is done, we can check the version of chrome driver by running the following command on the terminal: chromedriver -versionĪt the time of writing, the latest version of chromedriver installed by homebrew is version. ![]() Other package managers like npm have similar commands npm install chromedriver. Confirm it was installed using chromedriver -version and seeing it returns a version. # Open provided link in a browser window using the driver Here is a basic script to get up and running with selenium: from selenium import webdriver We can now go ahead and create a python script that utilizes it. The easiest way to install ChromeDriver is to use your package manager such as brew or npm to install the driver. Let’s save this and move over to the terminal.
0 Comments
Leave a Reply. |