@protocol GREYAction <NSObject>
A protocol for actions that are performed on accessibility elements.
Perform the action specified by the GREYAction object on an @c element if and only if the @c element matches the constraints of the action.
- (BOOL)perform:(id)element error:(NSError **)errorOrNil;
func perform(_ element: Any!, error errorOrNil: UnsafeMutablePointer
The element the action is to be performed on. This must not be @c nil. @param[out] errorOrNil Error that will be populated on failure. The implementing class should handle the behavior when it is @c nil by, for example, logging the error or throwing an exception.
@c YES if the action succeeded, else @c NO. If an action returns @c NO, it does not mean that the action was not performed at all but somewhere during the action execution the error occured and so the UI may be in an unrecoverable state.
A method to get the name of this action.
- (NSString *)name;
func name() -> String!
The name of the action. If the action fails, then the name is printed along with all other relevant information.