from appium import webdriver报错,ImportError: cannot import name 'InvalidArgumentException'

执行appium程序时遇到如下报错,ImportError: cannot import name 'InvalidArgumentException',

报错原因 selenium.common.exceptions.py中未定义InvalidArgumentException类,导致出现该报错,我的解决办法是 

在selenium.common.exceptions.py中直接定义了InvalidArgumentException,代码如下(C:\Users\Python35\Lib\site-packages\selenium\common)找到exceptions.py,添加下面的代码,再次执行脚本,ok.

from appium import webdriver报错,ImportError: cannot import name 'InvalidArgumentException'

class InvalidArgumentException(WebDriverException):
    """
    """
    pass

 

from appium import webdriver报错,ImportError: cannot import name 'InvalidArgumentException'