Upload
test-huddle
View
2.850
Download
0
Embed Size (px)
Citation preview
YOUR EXISTING INVESTMENT IN TESTS IS AN IMPORTANT ASSET TO YOU AND YOUR COMPANY
Me. Just now.
SELENIUM 3
SELENIUM 3
UPGRADING: WEBDRIVER USERS
▸ Remove references to deprecated classes
▸ Drop in the 3.0 jar
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
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
SELENIUM 3
UPGRADING: IDE USERS
▸ Download the new selenium-html-runner.jar
▸ Use that instead of selenium-server.jar
▸ Run your tests
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
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
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
SELENIUM 3
THE CHROME AND EDGE DRIVERS
▸ Made by Google and Microsoft
▸ Try them out!
▸ You probably already use them :)
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.
SELENIUM 3
SAFARIDRIVER
▸ Safari 10+, Apple own the SafariDriver
▸ Selenium project will no longer maintain the OSS SafariDriver once Safari 10 ships
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.
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