Loadablecomponents
a project to demo loadablecomponent pattern
- The LoadableComponent is a base class that aims to make writing PageObjects less painful.
- It does this by providing a standard way of ensuring that pages are loaded and providing hooks to make debugging the failure of a page to load easier.
- You can use it to help reduce the amount of boilerplate code in your tests, which in turn make maintaining your tests less tiresome.
- LoadableComponent is another way to approach PageObjects.
- LoadableComponent is a base class that all of the pages need to extend.
- The base class has the following methods on the interface:
get() isLoaded() load()
- Instead of the usual public class PageObject, we change it: public class PageObject extends LoadableComponent Extending an abstract class is a contract to implement the methods in the parent class "load() and isLoaded()". The load method will be designed to load the page; and the isLoaded() method should enable the validation if the page has been loaded correctly.
There is currently an implementation in Java that ships as part of Selenium 2, but the approach used is simple enough to be implemented in any language.
Reference :
##Page locators if identified using the can be verified in the browser console
- cssSelector
$$("div#content > .heading")
- xpath
$x("//h1[@class='heading']")
#lowLoadableComponent and NoSuchElementException
#Windows based basic authentication -Robot class is used to generate native system input events for the purposes of test automation, *self-running dems, and other applications where control of the mouse and keyboard is needed. *The primary purpose of Robot is to facilitate automated testing of Java platform implementations.