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