描述:

表视图上一共有三个组,每个组的头视图上有个 button,点击 button 显示组下面的单元格。
我尝试过通过路径,name,以及 ID 查找组上面的 button,每次运行脚本的时候,点击这几个按钮会偶尔出错。
关于查找元素我封装了一个框架,其他地方也是用的这个框架,但是其它地方都没错,就这个地方会出错。
页面截图如下:


日志如下:
Connected to pydev debugger (build 162.1628.8)
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1556, in
globals = debugger.run(setup['file'], None, None, is_module)
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 940, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Users/Hexin/Desktop/iHexin/0000.py", line 84, in
test_search(driver)
File "/Users/Hexin/Desktop/iHexin/0000.py", line 28, in test_search
guzhiqihuo_gengduo_page.shangzheng50.click()
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webelement.py", line 72, in click
self._execute(Command.CLICK_ELEMENT)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webelement.py", line 461, in _execute
return self._parent.execute(command, params)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/Library/Python/2.7/site-packages/appium/webdriver/errorhandler.py", line 29, in check_response
raise wde
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command.


↙↙↙阅读原文可查看相关链接,并与作者交流