APPIUM,如何获取滑动的x和y坐标

APPIUM, how to get x and y coordinates for swiping

在 Appium documentation 中,它说我必须传入 x 和 y 值。我怎么知道我想向左或向右滑动的部分的 x 和 y 值。我正在使用 uiautomationviewer (Android),我需要任何工具吗?

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

您不需要任何工具来获取 x、y 值。

只需在您的 Android 设备/模拟器中启用此选项:

Settings > Developer options > Enable 'Pointer location'

启用此功能后,点击屏幕 -> x,y 定位器值将显示在顶部栏中。

启用指针位置:

x, y 值: