Is there any way to get Firefox working with Selenium WebDriver on Mac OSX

0 votes

I am trying to configure proxy settings for WebDriver so I have used the below code:

FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.proxy.type", 1);
profile.setPreference("network.proxy.http","207.229.122.162");
profile.setPreference("network.proxy.http_port", 3128); 
WebDriver driver = new FirefoxDriver(profile);
selenium = new WebDriverBackedSelenium(driver, "http://www.example.com/");

And after running it on the file I am getting an exception like this:

org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH.

Make sure firefox is installed. OS appears to be: MAC

System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.6.8',

java.version: '1.6.0_29'

Driver info: driver.version: FirefoxDriver

Can anyone help me out with this and also how and where to give the path to access firefoxprofile()

Jun 14, 2019 in Selenium by Vaishnavi
• 1,180 points
2,818 views

1 answer to this question.

0 votes

You can try calling the webdriver with new FirefoxBinary this way:

FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("network.proxy.type", 1);
profile.setPreference("network.proxy.http","207.229.122.162");
profile.setPreference("network.proxy.http_port", 3128); 

WebDriver driver = new FirefoxDriver(new FirefoxBinary(new File("path/to/your/firefox.exe")), profile);
answered Jun 19, 2019 by Anvi
• 14,150 points

Related Questions In Selenium

0 votes
1 answer

How to check if an image is displayed on web page while working with Selenium WebDriver?

I've come across a similar situation before, where the image ...READ MORE

answered May 10, 2019 in Selenium by Surya
• 970 points
7,925 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,674 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,143 views
0 votes
2 answers

What is the role of TestNG & JUnit frameworks in Selenium?

TestNG and JUnit are test frameworks . it ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
2,891 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,221 views
0 votes
2 answers

Is there any way to get the text of a web element using Selenium Webdriver?

use gettext() in java : string lableText = ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
8,485 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP