简体   繁体   English

UI Automation如何执行滑动手势

[英]UI Automation how to perform swipe gesture

I want to perform swipe gesture on UITableView cell with automation script. 我想用自动化脚本在UITableView单元格上执行滑动手势。 I tried recording this action but I get this: 我尝试录制此动作,但我明白了:

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

These are the commands I was looking for: dragInsideWithOptions() or dragFromToForDuration; 这些是我正在寻找的命令: dragInsideWithOptions()dragFromToForDuration;

Use it like this 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}); 像这样使用它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});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM