【问题标题】:UI Automation how to perform swipe gestureUI 自动化如何执行滑动手势
【发布时间】:2012-11-28 19:25:30
【问题描述】:

我想使用自动化脚本在 UITableView 单元格上执行滑动手势。我试着记录这个动作,但我得到了这个:

target.frontMostApp().mainWindow().tableViews()[1].cells()[2].buttons()[0].scrollToVisible();

【问题讨论】:

    标签: ios cocoa-touch instruments ui-automation ui-testing


    【解决方案1】:

    这些是我正在寻找的命令:dragInsideWithOptions()dragFromToForDuration;

    这样使用target.frontMostApp().mainWindow().tableViews()[1].cells()[2].dragInsideWithOptions({startOffset:{x:0.0, y:0.1}, endOffset:{x:0.5, y:0.1}, duration:0.25});

    【讨论】:

    • 这对我不起作用。该应用程序只注册一个长按而不是滑动。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多