
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Install Selenium WebDriver on Mac OS
We can install Selenium on Mac OS. We shall take the help of Homebrew package manager for installation in Mac OS. Let us follow the step by step process −
Install Selenium by running the command −
pip install selenium
Install the Chrome driver with the homebrew by running the command −
brew cask install chromedriver
Verify the version of the Chrome driver, by running the command −
chromedriver −−version
Create a test script and try to execute after save.
from selenium import webdriver # driver initialization driver = webdriver.Chrome(executable_path="C:\chromedriver.exe") # launch URL driver.get("https://www.tutorialspoint.com/index.htm")
If the below error is triggered −
unknown error: cannot find chrome binary
It means the version of the Chrome driver is not compatible with the Chrome browser version we are using. We have to uninstall the Chrome and then downgrade or upgrade the browser as per the driver we have.
Advertisements