Selenium+python Environment Construction

Source: Internet
Author: User
Tags python script

Selenium Introduction:

Selenium1, also known as SELENIUMRC or remote Control. is the original project of selenium. RC is the operation that uses JS to drive the browser after the browser is started. Why is it called RC? Because RC is designed to support the control of selenium server on the remote server to operate the remote side of the browser.

Selenium2, also known as Selenium webdriver. Webdriver turned out to be another automated test tool, and then merged with Selenium. Webdriver directly invokes the browser itself on automation-supported interfaces to drive browser operations. Hence the name, it will have different driver to drive different browsers on different systems

Simply put, the original tool for the Selenium project is an IDE, RC, grid, and then an integrated framework. It is also the most popular PC B/S Architecture Automation test framework at present.

First, install the Python link: https://www.python.org/downloads/

Based on your own familiar version of the download, roughly 2. X and 3.X two versions, novice advice directly to start Python3, syntax than python2 easy to learn; Install complete python installation directory add to environment variable, convenient later command window character debugging;

Successful installation python will download the PIP and Setuptools,python2 by default and may require additional download (unpack the package and install it easy_insatll command).

Second, installation Selenium

Pip Install Selenium (the latest version of selenium is installed by default)

Pip Show Selenium (see if the installation was successful)

or download the Selenium package link directly: Https://pypi.python.org/pypi/selenium

Third, installation Webdriver

1.selenium installation will come with Firefox driver, but the low version of Firefox, the high version needs to be downloaded separately;

2. Download Google Browser driver need to note the version number corresponding, link: http://chromedriver.storage.googleapis.com/index.html, download completed in the Python script directory can be, Firefox and IE browser is the same.

Iv. Installing the compiler

1. Choose Python compiler pycharm, can reduce novice just start to encounter a variety of compile run problem, also more convenient debugging python, so do not want to start tossing in insignificant time, strongly recommend Pycharm;

2.sumline Text 3 can also be used, a bit is open to write code faster, but need to install Python plugin to compile and run, and often encounter inexplicable problems;

Five, the environment after the success of the simple operation of the first program, test

Six, the success of the operation, you are done, start your performance ~ ~ ~ encountered problems do not panic, one by one to check, not who can succeed at once;

Selenium+python Environment Construction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.