PageObject class
This class exists so page objects can seamlessly be passed to widget testing APIs as Finders. This helps to remove code noise from tests. See the tests in this package for an example.
- Inheritance
-
- Object
- FinderBase<
Element> - Finder
- PageObject
Constructors
- PageObject(Finder _finder)
- Creates a PageObject for this Finder
Properties
-
allCandidates
→ Iterable<
Element> -
Returns all of the items that will be considered by this finder.
no setterinherited
- description → String
-
Describes what the finder is looking for. The description should be
a brief English noun phrase describing the finder's requirements.
no setter
- first → Finder
-
Returns a variant of this finder that only matches the first item
found by this finder.
no setterinherited
-
found
→ FinderResult<
Element> -
The results of the latest evaluate or tryEvaluate call.
no setterinherited
- hasFound → bool
-
Whether or not this finder has any results in found.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- last → Finder
-
Returns a variant of this finder that only matches the last item
found by this finder.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipOffstage → bool
-
Whether this finder skips nodes that are offstage.
finalinherited
Methods
-
apply(
Iterable< Element> candidates) → Iterable<Element> - Returns all the elements in the given list that match this finder's pattern.
-
at(
int index) → Finder -
Returns a variant of this finder that only matches the item at the
given index found by this finder.
inherited
-
describeMatch(
Plurality plurality) → String -
Describes zero, one, or more candidates that match the requirements of a
finder.
inherited
-
evaluate(
) → Iterable< Element> -
Searches a set of candidates for those that meet the requirements set by
this finder and returns the result of that search.
override
-
findInCandidates(
Iterable< Element> candidates) → Iterable<Element> -
Returns all the items in the given list that match this
finder's requirements.
inherited
-
hitTestable(
{Alignment at = Alignment.center}) → Finder -
Returns a variant of this finder that only matches elements reachable by
a hit test.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
precache(
) → bool - Attempts to evaluate the finder. Returns whether any elements in the tree matched the finder. If any did, then the result is cached and can be obtained from evaluate.
-
reset(
) → void -
Resets all state of this FinderBase.
inherited
-
runCached(
VoidCallback run) → void -
Runs the given callback using cached results.
inherited
-
toString(
{bool describeSelf = false}) → String -
A string representation of this finder or its results.
inherited
-
tryEvaluate(
) → bool -
Searches a set of candidates for those that meet the requirements set by
this finder and returns whether the search found any matching candidates.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited