Geckodriver has improved.
Over the last few months, Geckodriver and WebDriver 3 have been conflated together. Certainly, I’ve only investigated Geckodriver updates when I was looking into Selenium WebDriver 3.
And with version 0.11.1 released, now it is time to have a fresh look at Geckodriver.
- Q: Does Firefox Marionette GeckoDriver v0.11.1 support WebDriver 2.53.1?
- Q: Does Selenium 3 make a difference for Marionette GeckoDriver?
- Q: Any workarounds for any issues?
- Q: But GeckDriver is still pretty bad right?
- Q: Should I try it?
Q: Does Firefox Marionette GeckoDriver v0.11.1 support WebDriver 2.53.1
Regardless if you upgrade to Selenium 3.0.0 you should upgrade to GeckoDriver v 0.11.1 when working with Selenium WebDriver.
Q: Does Selenium 3 make a difference for Marionette GeckoDriver?
A: I did find some differences using Selenium 3.0.0 with GeckoDriver v0.11.1 rather than Selenium 2.53.1
Alert tests passed,
Select tests passed in 3.0.0 but they failed in 2.53.1 so some internal difference took place that affected GeckoDriver.
Q: Any workarounds for any issues?
A: I was experiencing an issue with Frames, and I put down to a bug in GeckoDriver.
It might be, it might not be, but I have a workaround.
GeckoDriver handles frames fine. But… you can’t use
getTitle to pick up the title of the frame until you:
I don’t need to do this for any other browser driver, but it makes a difference for GeckoDriver.
I often synchronize on ‘wait for title’ when performing an action that switches between frames, this allows that approach to work.
Q: But GeckDriver is still pretty bad right?
It depends on what you’re doing. You should try it and see. You’ll probably find it works fine for you.
On my course:
- I have 182 tests that pass in Firefox 49.0.1 with Geckodriver v 0.11.1
- I have 13 tests that fail in Firefox 49.0.1 with Geckodriver v 0.11.1
These are fairly obscure edge cases that you might not encounter in the real world because they are a symptom of a hard to test application:
- Window management – jumping between open windows
- Cookie manipulation
Some issues you might, but I try and avoid these in the ‘real world’ anyway:
- Key chords having an extra char inserted
- User Action Drag and Drop and moveToElement
Some probably have workarounds (e.g. like the
defaultContent mentioned above, that I simply haven’t investigated yet).
Some of my issues were synchronization issues – true, they don’t happen with other drivers, but cross-browser, and cross driver, work sometimes means new synchronization required.
WebElement element= driver.findElement(By.id("_value_id"));
- I had to (only for Geckodriver) use:
WebElement element = wait.until(elementToBeClickable(By.id("_value_id")));
That’s just how it is sometimes.
I suspect my cookie issues might have workarounds that I just haven’t investigated yet.
Q: Should I try it?
Geckodriver works fine for ‘most things’.
Try it and see if it works for you.
You can use version 0.11.1 with 2.53.1 and 3.0.0 so you don’t have to change anything – just the driver.