- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to 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
To Continue Learning Please Login
Login with Google