html library
Exports all APIs and classes needed for running in-browser.
Classes
- ByCheckTag
- Finder annotations. See CssFinder for usage details. Finds elements by the page object's @CheckTag contents.
- ByClass
- Finds elements by their CSS class.
- ByCss
- Finds elements by some arbitrary CSS selector.
- ByDebugId
- Finds element by debugid.
- ById
- Finds element by ID.
- ByTagName
- Finds elements by tag name.
- ByTestId
- Finds element by 'data-test-id' attribute.
- Checker
- Checks some property of annotated element. Fails if this property does not hold at runtime.
- CheckTag
- Checker annotations. See Checker for usage details. Checks the tag for a page object.
- CheckTags
- Checks that a tag is one of the tag names provided.
- ClickOption
-
Additional options used in PageLoaderElement's
click()
or Mouse'sup()
,down()
method. - ContextFinder
- Finder based on page loader context.
- CssFinder
- Finder based on cssSelector.
- EnsureTag
- Combines @ByTagName and @CheckTag. For use only on class declarations.
- Filter
- Filters all elements found by a CssFinder.
- Finder
- Finds all matching elements STRICTLY underneath the parent context.
- First
- Given a finder select the first element.
- Global
- Finds elements based on the global context.
- HtmlMouse
- Support for mouse in in-browser context by dispatching MouseEvents.
- HtmlPageLoaderElement
- Base class for HTML elements.
- HtmlPageUtils
- Support for PageUtils in HTML context.
- HtmlPointer
- Support for pointer in in-browser context by dispatching PointerEvents.
- IsDisplayed
- Keeps PageLoaderElement that are displayed or non-displayed based on 'display' style.
- IsTag
- Keeps only PageLoaderElements that correspond to the given tag.
- MouseButton
- Common mouse button for webdriver.
- NullPageLoaderElement
- Null PageLoaderElement is used in place of 'null' value.
- NullPageLoaderElementAccessException
- PageElementIterable
- Interface for iterables of PageLoaderElements.
- PageLoaderAttributes
- Generic attributes interface, allowing bracket notation referencing.
- PageLoaderElement
- Base class for interacting with raw DOM elements, e.g. buttons, input fields, etc.
- PageLoaderException
- PageLoaderKeyboard
- Keyboard object used to group keyboard events that should be executed consecutively.
- PageLoaderListener
- Listener for PageLoader events.
- PageLoaderMouse
- Interface for the mouse.
- PageLoaderPointer
- Interface for the pointer events.
- PageLoaderSource
- Base class for Pageloader entities that behave as the source for other PageLoaderElements.
- PageObject
-
This annotation is required by the pageloader generator.
Class level annotation, present on all page objects. If this is not present
no generation will take place.
The optional code parameter is used in the generated
findChain()
method, which helps WebDriver Test Creator to generate proper code without walking down the tree further. If that is not provided, it will go as deep as it can and append the corresponding code from defaultCode based onaction
. -
PageObjectIterable<
E> - Iterable for collections of page objects and PageLoaderElements.
-
PageObjectIterator<
E> - Iterator for page objects.
-
PageObjectList<
E> - List implementation specific for Pageloader. Iterable for collections of page objects and PageLoaderElements.
- PageUtils
- Convenience methods that vary based on environment.
- SinglePageObjectException
- WithAttribute
- Keeps only PageLoaderElements that have the given attribute with the given value.
- WithClass
- Keeps only PageLoaderElements with the given class.
- WithInnerText
- Keeps only PageLoaderElements with the given inner text.
- WithProperty
- Keeps only PageLoaderElements that have the given property with the given value.
- WithVisibleText
- Keeps only PageLoaderElements with the given visible text.
Enums
- KeyboardEventType
- Keyboard event type.
- PageLoaderSpecialKey
- Special key that may be sent on an element.
Constants
- json → const JsonCodec
- An instance of the default implementation of the JsonCodec.
- Mouse → const _Mouse
- Convenience annotation for using PageLoaderMouse within a page object.
- nullElement → const _NullElement
- Labels a PageLoaderElement or PageObject as an empty entity. Calling 'exists' on a PageLoaderElement or PageObject annotated with '@nullElement' will always return false. An empty PageLoaderElement or PageObject should be used in place of returning a null value.
- Pointer → const _Pointer
- Convenience annotation for using PageLoaderPointer within a page object.
- root → const _Root
- Matches the root PageLoaderElement being used for constructing the current page object. Allows PageLoaderElement interactions (e.g. clicking) directly on a page object.
Functions
-
getOuterHtml(
PageLoaderElement? element) → String -
globalMouse(
SyncFn? syncFn) → HtmlMouse - Returns the globally used HtmlMouse in Html based tests.
-
globalPointer(
SyncFn? syncFn) → HtmlPointer - Returns the globally used HtmlPointer in Html based tests.
-
noOpExecuteSyncedFn(
Future fn()) → Future< Null> - Default 'do nothing' sync function.
Typedefs
-
PageObjectConstructor<
E> = E Function(PageLoaderElement e) - Function for constructing a page object.
-
SyncFn<
T> = Future< T> Function(Future<T> fn()) - Function used for synchronizing execution.