Giter Site home page Giter Site logo

craigstockton / uinavigator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from softwareonpurpose/uinavigator

1.0 2.0 0.0 9.16 MB

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

License: Apache License 2.0

Java 99.36% HTML 0.64%

uinavigator's Introduction

uinavigator

UiNavigator provides individual facades to the WebDriver and WebElement functionality of WebDriver. Host is a singleton which can be initialized with a DriverInstantiation for any WebDriver -- browser or mobile. Use of Selenium '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. References to WebElements are instantiated just-in-time, only when needed, avoiding Stale Element issues common when references are instantiated on page load.

Browser Drivers - For each browser to be supported, add the appropriate executable (e.g. ChromeDriver.exe, GeckoDriver.exe) to java/main/resources. DefaultDriverInstantiations are provided for the most common.
NO EXECUTABLE BROWSER DRIVERS ARE INCLUDED WITH THIS PACKAGE.

UiHost - Facade for WebDriver (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.

UiElement - Facade for WebElement related functionality (e.g. getText(), click())

UiView - Implementation of the 'Page Object' model, providing 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.
  • Suggest 'in[Region]' methods for returning a region of a given page (e.g. inHeader(), inContet(), inItemList())

UiRegion - Encapsulates the model of a "region" of a web page in the same manner UiView models a web page. This improves the cohesion of the test code AND facilitates reuse for shared regions (e.g. header, footer, sidebar)

uinavigator's People

Contributors

craigstockton avatar craigstockton-tgs avatar carlosibarratgs avatar sradhakrishnan-teksystems avatar

Stargazers

Cole Sulak avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.