檢視python,selenium版本號

2022-03-15 12:52:15 字數 338 閱讀 2109

最近在學習python+selenium,指令碼範例上很多時候要看python是2.x還是3.x的版本

腦子又不好使,使用過的命令常常記不住需要找度娘,今天就記錄下來

一、檢視python版本號

在cmd視窗中輸入:

方法1:python -v 

方法2:python --version

二、檢視selenium版本號

方法1:

在cmd視窗中輸入python:

>>> import selenium

>>> help(selenium)

方法2:在cmd視窗中直接輸入:pip show selenium

mac環境安裝python selenium

mac自帶的python版本是2的,可以先公升級到python 3 mac安裝python3 selenium可以通過pip進行安裝 驗證 1.安裝pip version 20.0.2 selenium 3.141 2.安裝pycharm version 2019.3.3 3.安裝firefox 6...

Python seleniu3 元素定位

1 瀏覽器.find element by id id屬性值 2 瀏覽器.find element by name name屬性值 3 瀏覽器.find element by class name class屬性值 4 瀏覽器.find element by tag name 標籤名 5 瀏覽器.i...

gdb檢視mysql GDB檢視命令

關於 gdb 除錯工具,主要是講解它的字元介面的使用,也就是使用命令除錯程式。gdb 中除錯的命令非常的多,具體可以通過 help 命令檢視。檢視命令的種類 檢視各個種類的命令可以進入到 gdb 的命令列模式中,使用 help 命令檢視,使用方式 gdb help 不需要新增任何的引數,例如 gdb...