- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Using the Selenium WebDriver - Unable to launch chrome browser on Mac
While working with Selenium webdriver, we may be unable to launch the Chrome browser on Mac. However, it can be avoided by following the steps listed below −
Step1 − Navigate to the link:https://sites.google.com/chromium.org/driver/ and click on the download link of the chromedriver version which is compatible with our local chrome browser.
Step2 − Click on the chromedriver link available for the Mac operating system.
Step3 − Once the download of the zip file gets completed, unzip it to get the chromedriver.exe file. Save it to a desired location.
Step4 − While mentioning the path of the chromedriver.exe file in the System.setProperty method, we can mention only chromedriver instead of chromedriver.exe.
Code Implementation
import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; public class FirstAssign { public static void main(String[] args) { //configure path of chromedriver.exe System.setProperty("webdriver.chrome.driver", "chromedriver"); //ChromeDriver instance WebDriver driver = new ChromeDriver(); //implicit wait driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); //url launch driver.get ("https://www.tutorialspoint.com/about/about_careers.htm"); System.out.println("Page title: "+ driver.getTitle()); //browser quit driver.quit(); } }
Output
- Related Articles
- How to launch Chrome Browser via Selenium?
- How to launch Edge browser with Selenium Webdriver?
- How to run Selenium tests on Chrome Browser using?
- How to open a link in new tab of chrome browser using Selenium WebDriver?
- Is there any way to load an extension in chrome browser using Selenium Webdriver?
- How to install Selenium WebDriver on Mac OS?
- How to get Firefox working with Selenium WebDriver on Mac OSX?
- Capturing browser logs with Selenium WebDriver using Java.
- How to maximize the browser window in Selenium WebDriver using C#?
- How to open a new window on a browser using Selenium WebDriver for python?
- How to connect to an already open browser using Selenium Webdriver?
- How to invoke the Chrome browser in Selenium with python?
- How to close child browser window in Selenium WebDriver using Java?
- Running Selenium WebDriver python bindings in chrome.
- How does selenium webdriver upload files to the browser?

Advertisements