I spent a fair few hours working through all the tests and examples on my Selenium WebDriver Course to check compatibility with WebDriver 2.42.2 and the most recent browsers.
- Chrome Version 35.0.1916.153 m
- IE Version 11.0.9600.17126
- Firefox version 30.0
- HTMLUnit 2.14 (included with WebDriver 2.42.2)
Let’s get opera out of the way quickly – since operadriver only supports Opera up to version 12.16, and the current version is 22 – I didn’t run the tests against this. Pity, since Opera still feels like a fast browser.
And let’s get IE out of the way quickly, but not dismiss it. IE 11 still awaits the official driver from Microsoft, so we should expect the current driver to have issues with it. There were a whole bunch of tests I was able to reinstate against IE because the driver functionality has moved on since I last checked it. But sadly, the speed of sendtext kills tests in IE11. I didn’t spend a lot of time debugging the tests against IE 11 – hopefully Microsoft will get an official driver out soon.
Pity, as the IE driver has improved a lot for 8,9, and 10. Previously I had failing tests for user interactions, alerts, input alerts, and these no longer occur.
Firefox trundled along happily with no changes to my codebase to keep the tests running due to the driver, just one change to the codebase and it was my fault:
- I found a bug in one of my tests because Firefox was no longer tolerant of my mistakes
- I had left a release in after a drag and drop, and now I receive an exception about “can’t release button when not clicked”, so I fixed my code
- don’t do that, do this
Chrome required a few changes:
- I had to deal with the “–ignore-certificate-errors” reporting by adding a chrome option when starting the driver “options.addArguments(“test-type”);”
- Chrome seems to create rogue cookies when you add a cookie with the domain in it (I raised this as an issue 7499 (now moved to ChromeDriver issue 824) but I suspect most people will never encounter this issue). And the workaround – just don’t add the domain, the cookie will still be created fine.
- Chrome now supports submitting forms with a keypress on the submit button (which it didn’t last time I checked) so I re-enabled that test for Chrome
Always remember to double check issues with your automation manually kids.
I found an issue with Chrome – that had nothing to do with WebDriver.
One of my tests uses sendkeys to select items from a dropdown by typing in the text of the dropdown option. This has previously worked, and still works on Firefox. But it doesn’t work on Chrome through WebDriver. And it doesn’t work on Chrome when I repeat the test manually, so I’m putting this down to a Chrome nuance, rather than a WebDriver nuance.
I also found an interesting side-effect of getAttribute, that I’ll blog about separately.