-
Notifications
You must be signed in to change notification settings - Fork 11
Architectural Overview
Alec Henninger edited this page Mar 4, 2015
·
2 revisions
First, it is critical you understand darcy's domain model.
Key classes:
-
View
: Top level interface for page objects. -
AbstractView
: Entry-point for writing a page object; allows consumers to declare elements as fields and use annotations to describe load conditions. -
Locator
: A strategy for finding something inside of a Context. -
By
: Factory methods for various Locators (inspired by WebDriver's By class). -
Context
: Something that can find other things using a locator. -
ElementContext
: Can find elements. -
ElementSelection
: Selections are used to fluently pick out types of things you are trying to find. An element selection has default methods for the various element types. -
Elements
: Defining elements as fields means doing so without a Context. So, dynamic proxies are used that can have their context lazily assigned.
The various element APIs are found in the elements
package. Ultimately, these are what tie darcy to some implementation. In order to get elements, however, there also needs to be an ElementContext implementation, and that context must support at least one Locator.