Yes, I know that Selenium 3 has been out for a while, but I’ve finally got around at looking at updating our end-to-end tests to use it. Newer versions of Firefox require Geckodriver which require Selenium 3.3+ so it’s a forced upgrade of sorts.
The main thing that affects us is the deprecation of the
isElementPresent method on
So this no longer works:
return this.driver.isElementPresent( this.quoteSelector );
You need to be a bit more verbose now to check the same thing:
return this.driver.findElements( this.quoteSelector ).then( e => !!e.length );
I’ll most likely write a helper method that achieves the same thing as
isElementPresent did; I’m not sure why it was removed in the first place.
And after upgrading I tried running against Firefox only to see:
WebDriverError: Unable to parse new session response
It turns out that WebDriverJs 3.3.0 doesn’t support Geckodriver after all 😕
I miss the good old days where Selenium could just drive Firefox without extra dependencies.