First a background introduction / discussion
Now the goodies:
Verifying images – “really” verifying an image is rendered/displayed on the browser, not just a broken link
Manipulating (or clearing) HTML5 local & session storage
Can add/remove, check for data, etc. but in terms of automated testing, we’re more likely just wanting to clear storage cache like clearing cookies. The above link is a Java example for session storage, but can be adapted to other languages, and local storage has the same API, just window.localStorage instead. And read this for more info on working with HTML5 local & session storage: http://diveintohtml5.info/storage.html
In case the native actions drag & drop fails to work for any given browser, or where not available like SafariDriver
http://code.google.com/p/selenium/issues/detail?id=2067, comment #60 & other related comments (before & after that are relevant). This method useful when the native method fails for any given browser, and currently is only option for SafariDriver.
See the mouse over link above for code. You then just need to modify the code to replace “mouseover” with “click” and “onmouseover” with “onclick”. How is this useful? When the regular WebElement.click() method fails to cause the expected click action, and in case the native interactions / Actions API fails to work either (or where not available like SafariDriver).
Mouse wheel zoom action
Getting a WebElement from x and y coordinate among other neat stuff too
more to come…