【发布时间】:2021-02-28 03:12:01
【问题描述】:
我正在尝试从英尺滚动/滑动到 m。在我的 Appium 中使用 Python 测试。
脚的可访问性 ID 是 ft.,公制是 m.
这是我试图用来执行此操作的代码 sn-p,但 ft. 不会切换到 m.
WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.ACCESSIBILITY_ID, "ft.")))
start = driver.find_element_by_accessibility_id("ft.")
time.sleep(1)
WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.ACCESSIBILITY_ID, "m.")))
end = driver.find_element_by_accessibility_id("m.")
time.sleep(1)
TouchAction(driver).press(start).move_to(end).release().perform()
如何将其更改为 m.? (下图中我玩过滑动但不能依赖坐标)
【问题讨论】:
标签: python-3.x appium python-appium