如何查看python selenium的api

來源:互聯網
上載者:User

標籤:oca   如何   ctr   方法   pytho   接下來   自己   簡單介紹   令行   

經常發現很多同學裝好了python+selenium webdriver開發環境後不知道怎麼去查看api文檔,在這裡乙醇簡單介紹一下具體方法,其實非常簡單。

首先開啟命令列,在dos視窗輸入:

1

python -m pydoc -p 4567

簡單解釋一下:

  • python -m pydoc表示開啟pydoc模組,pydoc是查看python文檔的首選工具;
  • -p 4567表示在4567連接埠上啟動server;

然後在瀏覽器中訪問http://localhost:4567/,此時應該可以看到python中所有的Modules

按ctrl+f,輸入selenium,定位到selenium文檔的連結,然後點擊進入到http://localhost:4567/selenium.html這個頁面

這就是selenium文檔所在的位置了,接下來便可以根據自己的需要進行查看了。舉個例子,如果你想查看Webdriver類的基本方法,可以訪問這個頁面http://localhost:4567/selenium.webdriver.remote.webdriver.html

如何查看python selenium的api

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.