Basic Selenium

Start Firefox browser on MAC using Selenium webdriver

Firefox browser on mac using Selenium webdriver

To start Firefox browser on MAC using Selenium webdriver we have to use gecko driver which will interact with Firefox browser.In the previous post, we have already discussed how to work with Chrome on MAC using Selenium.

In Selenium 2 we have not used any driver for Firefox but in Selenium 3 for every browser, we have to use third party driver which will perform our task.

Firefox with windows is quite easy where you have to download and mention the path but here we have small change so let’s get started with firefox on MAC.

Firefox browser on mac using Selenium webdriver

Step 1- Download gecko driver and unzip

Download link  https://github.com/mozilla/geckodriver/releases

Firefox browser on mac using Selenium webdriver

 

Step 2- Keep the drivers in /usr/local/bin directory.

Chrome Browser ON MAC using Selenium

Chrome Browser ON MAC using Selenium

 

Firefox browser on mac using Selenium webdriver

Step 3- Write your test

Program for Firefox browser on mac using Selenium webdriver

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.firefox.FirefoxDriver;



public class HandleDropDown3 {



   public static void main(String[] args) throws InterruptedException {

       WebDriver driver=new FirefoxDriver();

       driver.manage().window().maximize();

       driver.manage().timeouts().pageLoadTimeout(1, TimeUnit.SECONDS);

       driver.get("https://vistasadprojects.com/mukeshotwani-blogs-v2/");

   }

}

 

As you can see we have not set any property in our program to work with Firefox browser. It will take automatically and will start our execution.

Hope you have liked the above article if you still have any doubt then do let me know in the comment section.

 

 

 

author-avatar

About Mukesh Otwani

I am Mukesh Otwani working professional in a beautiful city Bangalore India. I completed by BE from RGPV university Bhopal. I have passion towards automation testing since couple of years I started with Selenium then I got chance to work with other tools like Maven, Ant, Git, GitHub, Jenkins, Sikuli, Selenium Builder etc.

6 thoughts on “Start Firefox browser on MAC using Selenium webdriver

  1. Anusha says:

    Hello Mukesh,
    All your posts are very informative. I have found solution to most of my automation problems from your articles. Keep it going !!!!

    1. Hi Anusha,

      I am very happy to read from you…:)

  2. Monali says:

    Hi Mukesh,

    Can you please more videos or articles regarding Applitool which is used for selenium automation

    1. Hi Monali,

      Not sure about this Applitool 🙁

  3. Mitesh says:

    Please elaborate the step or please make the video so i can understand in youtube there complicated video of selenium webdriver for Mac

    1. Hi Mitesh,

      yes will do that but in post also its clear step by step process.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.