- 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
How to get Firefox working with Selenium WebDriver on Mac OSX?
We can get Firefox working with Selenium webdriver on Mac OS. For Firefox versions which are greater than 47, the geckodriver.exe file is to be used. We shall be able to launch the browser only after creating an object of the FirefoxDriver class.
Syntax
WebDriver driver=new FirefoxDriver();
Visit the link − https://www.selenium.dev/downloads/ and go to the Browser segment. Click on the Documentation link below Firefox.
In the Supported platforms page, click on geckodriver releases link.
Then click on the link corresponding to Mac OS.
Once downloaded, extract the file and save the geckodriver.exe file to the /usr/local/bin location. As in Windows, we do not need to configure any path of the file in Mac.
Example
import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import java.util.concurrent.TimeUnit; public class FirefoxOnMac{ public static void main(String[] args) { WebDriver driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(4, TimeUnit.SECONDS); driver.get("https://www.tutorialspoint.com/index.htm"); driver.quit(); } }
- Related Articles
- How to install Selenium WebDriver on Mac OS?
- How to hide Firefox window (Selenium WebDriver)?
- How to install NumPy for Python 3.3.5 on Mac OSX 10.9?
- How to set Proxy in Firefox using Selenium WebDriver?
- Using the Selenium WebDriver - Unable to launch chrome browser on Mac
- Handle Firefox Not Responding While Using Selenium WebDriver With Python?
- How does Selenium Webdriver handle SSL certificate in Firefox?
- How to get Response Status Code with Selenium WebDriver?
- How to get rid of Firefox logging in Selenium?
- How to get selected option using Selenium WebDriver with Java?
- How to get selected option using Selenium WebDriver with Python?
- sendKeys() not working in Selenium Webdriver
- Where can I find a definitive Selenium WebDriver to Firefox Compatibility Matrix?
- How to get Tooltip Text in Selenium Webdriver?
- Get page title with Selenium WebDriver using Java.

Advertisements