python selenium.common.exceptions.InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for this session

python selenium.common.exceptions.InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for this session

或者

 cannot import name 'webdriver' from 'appium'

 

原来是我的文件叫 appium.py 如果叫selenium.py,也可能出错,导致Python会先导入这个文件,然后再导入标准库里面的selenium.py。

 

把当前目录下的文件删除或者重命名之后再run正常。

posted @ 2020-02-25 14:23  拍片哥  阅读(907)  评论(0编辑  收藏  举报