- Best Eclipse Editor For Webdriver Using Macy's Cyber
- Best Eclipse Editor For Webdriver Using Macro
- Eclipse Editor For Python
- Best Eclipse Editor For Webdriver Using Macy's Black
In the last post we saw How to setup the selenium WebDriver using Eclipse. Now here we will see How to setup the Selenium WebDriver using the Maven project. Maven is a Build tool for java just as Ant is. I need help in configuring Eclipse with Selenium webdriver on Macbook. I understand that first I must have Java installed. When I click on Apple > About this Mac > More info > Software applications: I find among the list the following Java entries. In the subsequent sections, we will outline the necessary steps to setup Selenium Webdriver project. Please follow them one by one. Your First Selenium WebDriver Project in Eclipse. We’ve given the bare minimum steps required to set up a Selenium Webdriver project from scratch. Follow Eclipse IDE images for proper guidance. Selenium best automation tool is quite helpful. Selenium webdriver tutorial provides its users an insight and use of selenium webdriver with videos.
Active7 years, 3 months ago
Im new to Macs and Im having issues trying to run scripts on any browser, let alone IE or Chrome. Here is what Ive done so far:
- Installed the latest versions of Eclipse, Selenium standalone server and Selenium IDE
- Installed TestNG framework for Eclipse
- Installed Selenium web driver and the JAVA libraries
So far all I can do is just run the test scripts Ive created on FF12.
I have created some test scripts on FF12 using Selenium IDE, then exported them to Eclipse with TestNG and when I try to run them I get this error message 'Please add the directory containing 'firefox-bin' or 'firefox' to your PATH environment'
I have a feeling im missing a lot of steps to properly configure Eclipse & Selenium to run scripts on other browsers (ideally IE9 and the latest version of Chrome). And if thats not bad enough, im using a MacBook Pro (Ive been a PC person all my life). Please be gentle and any advice that I can get would be highly appreciated. Thanks
A.J4,68922 gold badges2323 silver badges3434 bronze badges
user1440741user1440741
1 Answer
Short answer
Seems like your firefox executable in not in the system path or in the default location. There are multiple ways to fix this
1.Set the firefox binary path in code
You need to set the webdriver.firefox.bin property. In java you can do this by using the following code:
2.Find where your firefox is installed and update that path in your path variable
3.Specify webdriver.firefox.bin as a system property when you start selenium server.
Once you do one of the above, your issue should be resolved.
Not so short answer - Why it fails?
Per FirefoxDriver javadoc -
org.openqa.selenium.firefox.FirefoxDriver
An implementation of the {#link WebDriver} interface that drives Firefox. This works through a firefox extension, which gets installed automatically if necessary. Important system variables are:
Best Eclipse Editor For Webdriver Using Macy's Cyber
webdriver.firefox.bin - Which firefox binary to use (normally 'firefox' on the PATH).
webdriver.firefox.profile - The name of the profile to use (normally 'WebDriver').
webdriver.firefox.profile - The name of the profile to use (normally 'WebDriver').
Here, webdriver.firefox.bin determines the path of firefox.exe (in windows) or firefox (in mac).
Usually, when you install firefox in your machine the path to firefox file gets added to the path variable. This will allow the user to call firefox from any place.
Webdriver will look for this firefox executable in the path variable and then in the default location. From selenium code, this default path is defined as given below:
If your firefox file is not available in /Contents/MacOS/firefox-bin then webdriver will not know where to find it. Hence the failure.
A.JA.J
Best Eclipse Editor For Webdriver Using Macro
4,68922 gold badges2323 silver badges3434 bronze badges
Eclipse Editor For Python
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.