gpt4 book ai didi

android - 无法向上滚动

转载 作者:太空狗 更新时间:2023-10-29 14:49:38 24 4
gpt4 key购买 nike

我正在使用

    action = TouchAction(self.driver)
action.press(self.element).perform()
height = self.element.size["height"]
action.move_to(x=0, y=height*int(height_multiplier)).perform()

在 android 中滚动。但是如果我给 height_multiplier 作为 12 它工作正常。也向下滚动。但是当我给它 -1-2 期望它也向上它给出错误

The coordinates provided to an interactions operation are invalid.

我已经尝试过 scroll(element1,element2) 但它不滚动,只是轻弹到结束。而且 driver.execute 的效果不如 mobile :scroll 尚未为 android 实现。有人知道解决方法吗?部分滚动正是我想要的

最佳答案

我实现了如下向上滚动:driver.swipe(0, scrollStart, 0, scrollEnd, 2000)其中 scrollStart < scrollEnd .两个值仍然必须为正以适合分辨率范围。

关于android - 无法向上滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36417603/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com