0

when am running selenium code using JAVA with Firefox driver, am getting errors. Firefox driver opened but it can't take website address.

Is selenium 3.x version support Firefox driver?

System.setProperty("webdriver.firefox.driver","C:\\Program Files (x86)\\Mozilla Firefox\\firefoxdriver.exe");
WebDriver wd = new FirefoxDriver();
wd.get("https://www.google.co.in/");
Naveen Kumar R B
  • 6,248
  • 5
  • 32
  • 65

1 Answers1

0

When using Selenium 3 , you have to download geckodriver, firefoxdriver is not supported anymore. And using it as below:

System.setProperty("webdriver.gecko.driver", {path of geckodriver.exe});
WebDriver driver = new FirefoxDriver();
Tung Thanh
  • 36
  • 3
  • To be more precise you can suggest the OP to use absolute path of the gecko driver as "C:\\absolute_path\\geckodriver.exe" – undetected Selenium Mar 20 '17 at 17:09
  • No, this is wrong answer, Selenium 3 supports Legacy firefox driver, Selenium version has nothing to do with firefox driver, Firefox version is depends upon firefox driver,above 45 works with geckodriver and 45 and below works with legacy firefox driver. – RAJ Mar 20 '17 at 17:16
  • @RAJ whether Selenium 3 supports legacy Firefox driver or not is a different question. I have asked the answer provider to be more clear with his/her answer on how to pass the key-value pair as it is clear from OP's question that he is a beginner. – undetected Selenium Mar 20 '17 at 17:40
  • @Dev I am not talking to you, If I had talked to you, then I would have mentioned your name, I am directly writing comment on Tung Thanh's answer. – RAJ Mar 20 '17 at 17:52
  • Thanks for sharing @RAJ – Tung Thanh Mar 21 '17 at 01:42