导入AppiumLibrary报错: ImportError: cannot import name 'InvalidArgumentException

导入AppiumLibrary报错: ImportError: cannot import name 'InvalidArgumentException
报错原因 selenium.common.exceptions.py中未定义InvalidArgumentException类,导致出现该报错.
解决办法:
在selenium.common.exceptions.py中直接定义了InvalidArgumentException,代码如下,在文件Libsite-packagesselenium-2.48.0-py2.7.eggseleniumcommonexceptions.py中加入以下代码:
class InvalidArgumentException(WebDriverException):
"""
"""
pass

保存后再重新导入appiumLibrary,颜色显示黑色,表示导入成功

原文地址:https://www.cnblogs.com/yinrw/p/9449141.html