前两三次没有报错,但是也不滑动,后面运行然后一直会报错
来源:1-8 页面滑动及初级使用

慕姐9362835
2019-12-26
报错信息:
[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
[UiAutomator] Moving to state ‘stopped’
[AndroidDriver] Shutting down Android driver
[Appium] Closing session, cause was ‘UiAUtomator shut down unexpectedly’
[Appium] Removing session 06c71d7d-f3e7-40ba-9c38-52dd42677ade from our master session lis
2回答
-
慕姐9362835
提问者
2019-12-26
已经解决 是因为页面没有加载完 我加了个sleep2秒 就好了,至于appium那个报错其实无伤大雅,可以不用去管的 应该是因为在创建一个程序实例 第二个实例就会强制终止第一个实例 所以才会出现这样的错,在代码最后加上driver.quit之后就完美解决,其实自己能解决 多去想一想就能自己搞定的 可以给同学们借鉴一下 也希望同学多思考 实在不行在找老师 啊哈哈
012019-12-27 -
慕姐9362835
提问者
2019-12-26
重启之后 appium不报错了 但是编译器报错如下selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command.
代码如下:
def proper_size():
size = driver.get_window_size()
width = size['width']
height = size['height']
return width, height
def swipe_left():
x = proper_size()[0]*0.9
x1 = proper_size()[0]*0.1
y = proper_size()[1]/2
driver.swipe(x, y, x1, y, 2000)
swipe_left()00
相似问题