Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll forward 在矩形下沿向上滑,但是开始点被遮挡导致失效 #893

Open
fish-ball opened this issue May 31, 2023 · 1 comment

Comments

@fish-ball
Copy link

  • 手机型号:任意
  • uiautomator2的版本号:2.16.23
  • 手机截图
    screenshot
@fish-ball
Copy link
Author

如图,蓝色框即为实际选中的 scrollable 控件。

实际调用代码是这样的:

el = d(resourceId='xxxx:id/rv', scrollable=True)
        print(el.exists, el.count)
        result = el.scroll.forward(steps=10, max_swipes=1000)

开始发现向后划(backward)是有效果的,但是向前滑没效果。

后来排查原因,在开发者选项中打开了“指针位置”,发现只要是 forward,滑动的开始点就必然在蓝框底部,这样会造成手势的起始点落在了被遮盖的页脚栏上,最终导致滚动无效。

然后翻查了一下 API,发现实现的 jsonrpc 中,并没有太多可以定制的余地。

如果框架不改,如何实现这一个操作?

或者说能否从框架层面自动判别解决这种被遮挡的情况?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant