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正常。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM