Skip to content

Encapsulates WebDriver for highly reliable and resilient interaction with Views and Elements

License

Notifications You must be signed in to change notification settings

randypfohl/uinavigator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uinavigator

UiNavigator provides individual proxies to the UI Host and UI Element functionality of WebDrivers. Host is a singleton which can be initialized with a DriverInstantiation for any WebDriver -- browser or mobile. Use of By locators is constrained to the most reliable and resilient (i.e. id, name, class, tag). Doing so encourages accessing UI elements in composite regions (encapsulated WebElements) resulting in further increased reliability and resilience. By locators for indiivdual Elements are instantiated just-in-time, only when needed, avoiding Stale Element issues common when references are instantiated on page load.

Host - Proxy for any Host (e.g. browser or device) related functionality (e.g. load(), waitUntilVisible()) provided by WebDriver and WebDriverWait. The WebDriver.findElement() method is referenced ONLY in this class, and utilized ONLY via the private Element.getElement() method.

Element - Encapsulates WebElement related functionality (e.g. getText(), click())

View - Encapsulates direct navigation to a view, and user-defined confirmation of state.

  • Suggest implementing a View interface which includes ONLY "state" methods (e.g. getText(), isActive(), getItemCount(), etc.) and "region" methods (e.g. inHeader(), inContent(), inFooter(), etc.).
  • Suggest "action" methods, which result in any change of state (e.g. linkClick(), login(String username), etc.) be implemented in concrete View classes, and always call the expect() method of the resulting concrete View.

About

Encapsulates WebDriver for highly reliable and resilient interaction with Views and Elements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%