GREYElementFinder
@interface GREYElementFinder : NSObject
Finds UI elements in GREYProvider that are accepted by a matcher.
-
The matcher the element finder is initialized with. Objects returned from this class must match this matcher.
Declaration
Objective-C
@property (readonly, nonatomic) id<GREYMatcher> matcher;
-
@remark init is not an available initializer. Use the other initializers.
Declaration
Objective-C
- (instancetype)init;
-
Initializes the finder with a given @c matcher.
Declaration
Objective-C
- (instancetype)initWithMatcher:(id<GREYMatcher>)matcher;
Parameters
matcher
Matcher that defines what elements the finder should search for.
Return Value
An instance of GREYElementFinder, initialized with a matcher.
-
Performs a search on elements provided by @c elementProvider and returns all the elements that are accepted by the matcher this object is initialized with.
Declaration
Objective-C
- (NSArray *)elementsMatchedInProvider:(id<GREYProvider>)elementProvider;
Parameters
elementProvider
Provides elements to run through the matcher.
Return Value
An array of matched elements. If no matching element is found, then it is empty. The relative order of the elements is preserved when returned.