0

This is related to Unable to tap (x,y) coordinate in landscape mode. I'm having difficulties controlling the coordinates in my UI tests with a landscape oriented simulator.

I've implemented the SmartXCUICoordinate for my UI tests. The tap() and press(forDuration duration: TimeInterval) methods work well.

I was wondering if someone has found a workaround for the method:

press(forDuration duration: TimeInterval, thenDragTo otherCoordinate: XCUICoordinate)

I haven't able to get away with wrapping this method since it takes in a XCUICoordinate rather than a SmartXCUICoordinate. Any help is much appreciated!

Community
  • 1
  • 1
  • 1
    When I use xcuiCoordinate.press(forDuration duration: TimeInterval, thenDragTo otherCoordinate: XCUICoordinate) method the ui test just locks up for me. I can't get this to work – Andrew Paul Simmons May 04 '17 at 16:52
  • Maggie, Casale, could you make your question more concise for this issue though? – Andrew Paul Simmons May 04 '17 at 16:53
  • @AndrewPaulSimmons Currently when you try and use XCUICoordinate methods on a horizontal simulator, the coordinates are inverted. I've found a workaround that uses a custom class SmartXCUICoordinate, and you're able to wrap the XCUICoordinate methods like tap() and press(forDuration duration: TimeInterval). I'd like to use the method press(forDuration duration: TimeInterval, thenDragTo otherCoordinate: XCUICoordinate) method, but cannot find a workaround for it since it takes in a XCUICoordinate and lock up when you try to use it. I'm wondering if someone else has found a workarond. – Maggie Casale May 05 '17 at 17:30

0 Answers0