Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a driver path of firefoxdriver in selenium

Hi I am very new to selenium . So pardon me for any technical mistakes. I have a project which works fine for IE. But I need to test using firefox too. Does the project require a pointer towards the driver like IEDriver in case of execution in IE?

like image 793
user1700354 Avatar asked Dec 19 '22 08:12

user1700354


2 Answers

You don't need to set the driver path for FirefoxDriver.
You can directly use WebDriver driver = new FirefoxDriver();.

However, there are other ways to run selenium in Firefox also, as below:

1- Using Firefox Profile;
Used to run selenium in a new user-defined profile with a set of preferences as necessary.

2- Using Firefox Binary;
[PS:- Not much Idea on how it works, But this link might help you out]

like image 174
Subh Avatar answered Jan 12 '23 04:01

Subh


In my enviroment I set the property -Dwebdriver.firefox.bin="C:\Mozilla Firefox\firefox.exe"

like image 24
kdoteu Avatar answered Jan 12 '23 04:01

kdoteu