APPIUM,如何获取用于滑动的 x 和 y 坐标 [英] APPIUM, how to get x and y coordinates for swiping

查看:26
本文介绍了APPIUM,如何获取用于滑动的 x 和 y 坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Appium

x, y 值:

In the Appium documentation, it says that i have to pass in an x and y value. How can I know the x and y value of a section i want to to swipe left or right on. I am using uiautomationviewer (Android), do I need any tools?

driver.swipe(start_x=75, start_y=500, end_x=75, end_y=0, duration=800)

解决方案

You don't need any tools for getting the x, y values.

Just enable this option in your Android device / Emulator:

Settings > Developer options > Enable 'Pointer location'

After enabling this once you tap on screen -> x, y locator values will be displayed in top bar.

Enable Pointer Location:

x, y values:

这篇关于APPIUM,如何获取用于滑动的 x 和 y 坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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