Appium日期选择器滚动android [英] Appium Date Picker Scroll android

查看:87
本文介绍了Appium日期选择器滚动android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,我是Appium Automation测试的新手,我需要根据下图自动执行android默认的OS日期选择器对话框.有人可以帮我吗?日期选择器对话框

Hey Guys I am new to Appium Automation testing... I need to work on automating the android default OS Date picker dialog as per the below image. Can some one help me on this?Date picker dialog

推荐答案

如前所述,您必须从左到右或从右到左自动执行滚动动作.

As you mentioned, you have to automate a scroll action from left-to-right or right-to-left.

这是一个如何从右向左滚动的示例:

This is an example of how to scroll from right-to-left:

    new TouchAction(wd)
            .press(900, 800)
            .waitAction(Duration.ofMillis(1000))
            .moveTo(900, 200)
            .release()
            .perform();

由于设备的分辨率很重要,因此您可以使用appium桌面获取正确的坐标.

You can use appium desktop in order to get the proper coordinates, since the resolution of your device matters.

这篇关于Appium日期选择器滚动android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆