我有以下代码点击屏幕中央。我不想触碰任何元素。只是在中心解散一些开放的小组。我该怎么做?在
touch = TouchAction()
dimension = driver.get_window_size()
touch.tap(element=None, x=int(dimension['width']/2),y=int(dimension['height']/2)).perform()
上面的代码会产生这个错误
^{pr2}$在上面的代码中,初始化TouchAction()时缺少驱动程序作为参数 所以我要做的就是
touch = TouchAction(driver)
代码在…之后起作用了。。。。在
可以使用TouchAction,示例在python客户端github页面上
也可以使用坐标(Java示例)
^{pr2}$希望对您有所帮助;)
相关问题 更多 >
编程相关推荐