UIAutomation's dragInsideWithOptions has no effect on iOS7 simulator

前端 未结 5 1790
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 12:57

Since I use Xcode 5 and the new iOS 7 simulator to run UIAutomation tests with Instruments, dragInsideWithOptions and dragFromToForDuration functio

5条回答
  •  鱼传尺愫
    2020-12-09 13:13

    This is a bit old but it seems that dragInsideWithOptions is still not working.

    For a UIScrollView these methods can be used:

    scrollUp
    scrollDown
    scrollLeft
    scrollRight
    

    Source: https://developer.apple.com/library/prerelease/ios/documentation/ToolsLanguages/Reference/UIAScrollViewClassReference/index.html

    Ex:

    UIATarget.localTarget().frontMostApp().mainWindow().scrollViews()[0].scrollRight();
    

    Hope it helps!

提交回复
热议问题