Reintegrate merge

Improvements for new versions of webdriver and Firefox.