appium定位xpath报错的解决办法(亲测有效)error“:“invalid argument“,“message“:“Exception while reading JSON“

通过weditor定位xpath的元素,确定存在,但是代码运行就是
报错:
error":“invalid argument”,“message”:“Exception while reading JSON”

解决办法如下:
进到python的安装目录
python311\Lib\site-packages\selenium\common
有个文件:exceptions.py

编辑该文件,加入类

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

在这里插入图片描述
再次运行,OK

你可能感兴趣的:(appium,json)