XCUIElement+FBForceTouch.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import <WebDriverAgentLib/XCUIElement.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. #if !TARGET_OS_TV
  12. @interface XCUIElement (FBForceTouch)
  13. /**
  14. Performs force touch on element
  15. @param relativeCoordinate hit point coordinate relative to the current element position.
  16. nil value means to use the default element hit point
  17. @param pressure The pressure of the force touch – valid values are [0, touch.maximumPossibleForce]
  18. nil value would use the default pressure value
  19. @param duration The duration of the gesture in float seconds
  20. nil value would use the default duration value
  21. @param error If there is an error, upon return contains an NSError object that describes the problem.
  22. @return YES if the operation succeeds, otherwise NO.
  23. */
  24. - (BOOL)fb_forceTouchCoordinate:(nullable NSValue *)relativeCoordinate
  25. pressure:(nullable NSNumber *)pressure
  26. duration:(nullable NSNumber *)duration
  27. error:(NSError **)error;
  28. @end
  29. #endif
  30. NS_ASSUME_NONNULL_END