Python用のWebブラウザ自動化ライブラリ「webbot」

スポンサーリンク

Python用のWebブラウザ自動化及びテストライブラリ「webbot」のインストールについて解説しています。

webbot(https://github.com/nateshmbhat/webbot)は、エンドツーエンドUIテスト用のPython用のWeb自動化ライブラリとなっています。あらゆる種類のWebページの自動化に対して、seleniumよりも多くの機能を備えた自動化を提供している。

■Python

今回のPythonのバージョンは、「3.7.9」を使用しています。(Windows10)(pythonランチャーでの確認)

■webbotをインストールする

webbotをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install webbot

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.7.9にインストールを行うために、pipを使う場合にはコマンドでの切り替えを行います。

py -3.7 -m pip install webbot

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable
Collecting webbot
Downloading webbot-0.34-py3-none-any.whl (12.9 MB)
|████████████████████████████████| 12.9 MB 381 kB/s
Collecting selenium
Downloading selenium-4.1.0-py3-none-any.whl (958 kB)
|████████████████████████████████| 958 kB 6.4 MB/s
Requirement already satisfied: urllib3[secure]~=1.26 in c:\users\user_\appdata\roaming\python\python37\site-packages (from selenium->webbot) (1.26.7)
Collecting trio~=0.17
Downloading trio-0.19.0-py3-none-any.whl (356 kB)
|████████████████████████████████| 356 kB 3.3 MB/s
Collecting trio-websocket~=0.9
Downloading trio_websocket-0.9.2-py3-none-any.whl (16 kB)
Collecting sniffio
Downloading sniffio-1.2.0-py3-none-any.whl (10 kB)
Collecting outcome
Downloading outcome-1.1.0-py2.py3-none-any.whl (9.7 kB)
Collecting cffi>=1.14
Downloading cffi-1.15.0-cp37-cp37m-win32.whl (166 kB)
|████████████████████████████████| 166 kB 6.4 MB/s
Collecting sortedcontainers
Downloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting attrs>=19.2.0
Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting async-generator>=1.9
Using cached async_generator-1.10-py3-none-any.whl (18 kB)
Requirement already satisfied: idna in c:\users\user_\appdata\roaming\python\python37\site-packages (from trio~=0.17->selenium->webbot) (3.3)
Collecting wsproto>=0.14
Downloading wsproto-1.0.0-py3-none-any.whl (24 kB)
Requirement already satisfied: certifi in c:\users\user_\appdata\roaming\python\python37\site-packages (from urllib3[secure]~=1.26->selenium->webbot) (2021.10.8)
Collecting pyOpenSSL>=0.14
Downloading pyOpenSSL-21.0.0-py2.py3-none-any.whl (55 kB)
|████████████████████████████████| 55 kB 1.1 MB/s
Collecting cryptography>=1.3.4
Downloading cryptography-36.0.1-cp36-abi3-win32.whl (1.9 MB)
|████████████████████████████████| 1.9 MB 3.3 MB/s
Collecting pycparser
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
|████████████████████████████████| 118 kB 3.2 MB/s
Requirement already satisfied: six>=1.5.2 in c:\users\user_\appdata\roaming\python\python37\site-packages (from pyOpenSSL>=0.14->urllib3[secure]~=1.26->selenium->webbot) (1.16.0)
Collecting h11<1,>=0.9.0
Using cached h11-0.12.0-py3-none-any.whl (54 kB)
Installing collected packages: pycparser, cffi, attrs, sortedcontainers, sniffio, outcome, h11, cryptography, async-generator, wsproto, trio, pyOpenSSL, trio-websocket, selenium, webbot
Successfully installed async-generator-1.10 attrs-21.2.0 cffi-1.15.0 cryptography-36.0.1 h11-0.12.0 outcome-1.1.0 pyOpenSSL-21.0.0 pycparser-2.21 selenium-4.1.0 sniffio-1.2.0 sortedcontainers-2.4.0 trio-0.19.0 trio-websocket-0.9.2 webbot-0.34 wsproto-1.0.0

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、webbotが正常にインストールされたことになります。

なお、今回はwebbotのバージョン0.34をインストールしました。

コメント

タイトルとURLをコピーしました