GREYElementMatcherBlock
@interface GREYElementMatcherBlock : GREYBaseMatcher
A block based implementation of GREYBaseMatcher. Enables custom implementation of protocol method using blocks.
-
The block which will be invoked for the GREYBaseMatcher::matches: method.
Declaration
Objective-C
@property (readwrite, copy, nonatomic) MatchesBlock matcherBlock;
-
The block which will be invoked for the GREYBaseMatcher::describeTo: method.
Declaration
Objective-C
@property (readwrite, copy, nonatomic) DescribeToBlock descriptionBlock;
Swift
var descriptionBlock: DescribeToBlock! { get set }
-
Class method to instantiate a custom matcher.
Declaration
Objective-C
+ (instancetype)matcherWithMatchesBlock:(MatchesBlock)matchBlock descriptionBlock:(DescribeToBlock)describeBlock;
Swift
class func matcher(withMatchesBlock matchBlock: Any!, descriptionBlock describeBlock: DescribeToBlock!) -> Self!
Parameters
matchBlock
A block for implementing GREYBaseMatcher::matches: method.
describeBlock
The block which will be invoked for the GREYBaseMatcher::describeTo: method.
Return Value
A GREYElementMatcherBlock instance, initialized with the required matching condition and description.
-
@remark init is not an available initializer. Use the other initializers.
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
-
Initializes a custom matcher.
Declaration
Objective-C
- (instancetype)initWithMatchesBlock:(MatchesBlock)matchBlock descriptionBlock:(DescribeToBlock)describeBlock;
Swift
init!(matchesBlock matchBlock: Any!, descriptionBlock describeBlock: DescribeToBlock!)
Parameters
matchBlock
A block for implementing GREYBaseMatcher::matches: method.
describeBlock
The block which will be invoked for the GREYBaseMatcher::describeTo: method.
Return Value
A GREYElementMatcherBlock instance, initialized with the required matching condition and description.