Selenium+Python environment configuration

Selenium+Python environment configuration

Install Python

Python official download address

Install Selenium

  • pip install selenium

Install Firefox driver

Firefox driver download address

Configure environment variables

  • Add Python environment variables
  • Add firefox.exe environment variables
  • Add driver environment variables

Restart the computer


# coding:utf-8
from selenium import webdriver
browser = webdriver.Firefox()
# visit safety guest
target = "https://www.anquanke.com"
browser.get(target)

The result is shown below:

Intelligent Recommendation

About python selenium+PhantomJS environment configuration error

My computer is Windows10, it is not useful to put the PhantomJS decompressed file directory into the environment variable. PhantomJS will report an error without parameters like this webdriver.Phantom...

Ubuntu configuration Python+selenium development environment

Install Python Ubuntu comes with Python2 and Python3, you can skip this step. Install pip Get the installation script Run the installation script Check if pip is installed successfully. Install seleni...

Python+selenium environment installation and configuration and example 20180808

1 Install python Download Python 3.6 Note: If you have an installation package for python 3.6, skip the steps to download Python 3.6. Download python3.6.x, the official website download address is:htt...

Python and selenium webdrive development environment configuration

1. Install Python 2. Use cmd to install seleniumWhen pip is not available, install pip Address: https://pypi.python.org/pypi/pip 3. Install selenium:  pip install -U selenium   pycharm ...

Python+selenium grid environment setup and configuration

One,selenium gridBrief introduction Selenium grid can test different browsers on different machines at the same time, including a hub and multiple nodes. node will send configuration information to hu...

More Recommendation

python+selenium+chrome driver environment configuration

1. The python environment Install anaconda, automatically configure the required modules for environment variables 2. Install selenium conda install selenium 3. Configure Chrome driver ​ 3.1, first go...

[Python crawler] Python3+selenium environment configuration

In our crawling process, we need to use Python3+selenium, Selenium is an automated testing tool, with it we can drive the browser to perform specific actions, such as click, drop down and other operat...

Python+Selenium+chromedriver installation and environment configuration

Python+Selenium+chromedriver installation and environment configuration Python 1. On the Internet (enter the URL https://www.python.org/downloads/) download the latest python program for Windows (Acco...

python+pycharm+selenium+ browser driver environment configuration

python+pycharm+selenium+ browser driver environment configuration Selenium interface automation, five steps of environment configuration: The first step is to download and install python Step 2 Downlo...

Python + Selenium + Chrome Webdriver environment variable configuration

Python + Selenium + Chrome Webdriver environment variable configuration When we use the Selenium module to call WebDriver, there will always be problems that there is no environmental variable. At thi...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top