ubuntu环境搭建selenium
Posted for-you
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu环境搭建selenium相关的知识,希望对你有一定的参考价值。
Environment
install selenium
You can use pip install selenium, maybe specify the version
pip install selenium==3.4.1
Download ChromeDriver
this website download ChromeDriver.
tip: you must knwon which version the your chrome is, you should download the version that support your chrome.
the latest version is:
Latest Release: ChromeDriver 2.33
Supports Chrome v60-62
when extract the rar file we can get single chromedriver file, then put it in $PATH.
show the path dir:
$ echo $PATH
so I will choose /usr/local/bin/
sudo mv ./chromedriver /usr/local/bin/
test if it works:
$ chromedriver
Starting ChromeDriver 2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3) on port 9515
Only local connections are allowed.
it starting on port 9515, wow it works.
以上是关于ubuntu环境搭建selenium的主要内容,如果未能解决你的问题,请参考以下文章
ununtu16.04+python3+selenium+firefox环境搭建
docker+selenium Grid搭建自动化分布式测试环境