I am now learning Selenium and have met a problem.
I am aware that Selenium supported old Firefox version by default without a driver. And for recent versions of Firefox, we have to download the driver and define it using System.setProperty
.
According to this link, for Firefox 45 and 46, start driver code could look like this:
WebDriver driver = new FirefoxDriver();
My Firefox is version 45.5.1., but above code still won't work. So according to this link, I have added:
System.setProperty("webdriver.firefox.marionette","C:\geckodriver.exe");
And it worked.
Then I realized that I haven't installed geckodriver.exe
on my computer. To see how it goes, I have changed to the code below:
System.setProperty("webdriver.firefox.marionette","");
It still works.
So, here comes my first problem: What happened? I am sure that no geckodriver.exe
exists in my environment. If no location has been pointed, then why should I have to set property?
Also, I have seen code like:
System.setProperty("webdriver.gecko.driver", "/tools/marionette/wires.exe");
My second question is that what is the difference between webdriver.gecko.driver
and webdriver.firefox.marionette
or wires.exe
and geckodriver.exe
?