Appium appium-IOS 怎么获取滚动轮播的元素

一世繁华 · October 23, 2017 · 689 hits

页面上有轮播 隔几秒就会滚动 我通过绝对路径获取,每次都会提示:
selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.

代码为:
# 轮播绝对路径
bannerPath='//XCUIElementTypeApplication[@name="XXX"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeScrollView/XCUIElementTypeOther[3]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeScrollView[2]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeImage'
# 点击轮播
driver.driver.find_element_by_xpath(bannerPath)

No Reply at the moment.
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up