1. 程式人生 > >Selenium+Python自動化測試學習問題總結筆記

Selenium+Python自動化測試學習問題總結筆記

錯誤 問題總結 測試 自動化測試 右擊 筆記 相同 src 定義

1.問題描述:不能導入自定義類

錯誤內容:This inspection detects names that should resolve but don‘t. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items

截圖:(count.py文件不能導入在相同路徑下的pub.py的方法)

技術分享圖片

解決方法1:將導入部分寫成:from WebTest.project.pub import add

(將路徑明確寫入)

解決方法2:進入:File—setting—Bulidout,Excution,Deployment—Console—Python Console 如下圖操作

技術分享圖片

之後右擊項目,如下圖操作

技術分享圖片

Selenium+Python自動化測試學習問題總結筆記