Key Takeaways:
- What will this release contain
- What impact will it have on your test runs
- How can you preserve your existing investment in tests using the Selenium WebDriver APIs, and your even older RC tests
- Looking forward, when will the W3C spec be complete
- What can we expect from Selenium 4
https://huddle.eurostarsoftwaretesting.com/
13. SELENIUM 3
UPGRADING: RC USERS
▸ Run your tests using the WebDriverBackedSelenium
▸ Fix your tests
▸ Drop in the 3.0 jar
▸ Add a reference to the “leg-rc” jar
▸ Migrate to the WebDriver APIs
▸ SeConf 2013 Closing Keynote by Jason Leyba
▸ https://www.youtube.com/watch?v=cSLmfegT36A
17. SELENIUM 3
UNSUPPORTED SELENIUM RC FEATURES
▸ Using the server as a proxy
▸ Use browsermob-proxy or similar
▸ Adding custom request headers
▸ Because Selenium isn’t an HTTP
proxy
▸ Browser side-logs
▸ Replaced by logging in each of
the drivers
18. SELENIUM 3
UPGRADING: IDE USERS
▸ Download the new selenium-html-
runner.jar
▸ Use that instead of selenium-
server.jar
▸ Run your tests
19. SELENIUM 3
MISSING IDE FEATURES
▸ Rollups
▸ Coming, but not implemented yet
▸ JS Extensions are handled as best as possible
▸ Loaded per-page, so may act differently
▸ Alert and Prompt handling may be odd
▸ Consider switching to Selenium Builder (http://
seleniumbuilder.github.io/se-builder/) or writing code
20. SELENIUM 3
WHY DO WE NEED A W3C SPEC
▸ Browsers are fearsomely complex
beasts
▸ Decouple selenium releases from
browser updates
https://flic.kr/p/7VHwy6
21. SELENIUM 3
THE W3C SPEC AND YOU
▸ Vision: The browser vendors own the driver
▸ Yes, this may mean another binary on your system
▸ But that binary is released by the browser vendor
▸ Tracks changes in the browser
▸ Decouples selenium releases from browser release
schedules
22. SELENIUM 3
THE CHROME AND EDGE DRIVERS
▸ Made by Google and Microsoft
▸ Try them out!
▸ You probably already use
them :)
23. SELENIUM 3
GECKODRIVER: NEXT GEN FIREFOX SUPPORT
▸ Download:
▸ https://github.com/mozilla/geckodriver/releases
▸ Mozilla have changed the architecture of Firefox
▸ 2.x and 3.x users must use the geckodriver for Firefox 48+
▸ Use ESR release (for now) to continue using the original
FirefoxDriver (for now)
▸ geckodriver does not support the Actions API yet.
24. SELENIUM 3
SAFARIDRIVER
▸ Safari 10+, Apple own the
SafariDriver
▸ Selenium project will no longer
maintain the OSS SafariDriver once
Safari 10 ships
26. SELENIUM 3
HOW TIMEOUTS WORK
▸ Implicit timeouts occur in the remote end.
▸ Explicit timeouts occur on the local end.
▸ The team suggestion: avoid using implicit timeouts if
possible.
27. SELENIUM 3
USING XPATH
▸ Depends on the underlying browser’s xpath
implementation
▸ Very easy to destroy readability of tests
▸ Only used by testers, and therefore fragile
▸ Suggest using CSS selectors instead
▸ Plus side: advances in JS engines mean that xpath isn’t as
slow as it used to be