- Download and install python, download "Python-2.7.9.msi" can be installed directly after
- Download install setuptools, download setuptools-11.3.1, use the command prompt to go to the location of setup.py in the installation package, execute setup.py install, perform the installation
- Download the install PIP tool, download pip-6.0.6, use the command prompt to go to the location of setup.py in the installation package, execute setup.py install, perform the installation
- Download install selenium, download selenium-2.44.0, use the command prompt to go to setup.py location in the installation package, perform setup.py install
- Download browser driver, download IEDriverServer.exe, and Python.exe in the same directory can be
- Install the Java JDK and configure the environment variables, download the installation Jdk-6u43-windows-i586.exe, and configure the environment variables
- Download eclipse, and you can use it directly after you unzip it.
- Download and install pydev+2.7.1, after decompression, there are plugins and features two folders
- Create a folder called Eclipse and put the above two folders in it
- Build a folder named Wbpro, put the Eclipse folder into it, the general structure of the plugin, such as : Wbpro/eclipse/{plugins,features}
- {eclipse/extplugins,links},
- under the Links folder , create a txt text, written in: Path=extplugins/wbpro, note
- start Eclipse, click Window->preferences in the menu bar, and in the pop-up dialog, look left side of the navigation bar, if there is your plug-in name, such as Wbpro, congratulations on your plugin installation success!
After the Pydev is installed, you need to configure the interpreter.
1. In the Eclipse menu bar, select Window > Preferences > Pydev > Interpreter –python>new , enter the installation path where thename and Python.exe are located, add the installed interpreter
2. Click OK to jump out of a window with a lot of checkboxes and select the option to join the system Pythonpath
3. You can generally use the default settings, click OK.
4. Click OK to save the configuration
10. Next, create a Python project.
1. Go to Pydev perspective, in the Eclipse menu bar, select File > New > Project > Pydev > Pydev Project, New project: Pycase, click Next.
Note: If the CREATE default SRC folder and add it to the Pythonpath check box is not selected when creating the project, you need to pass File > New > Other > Source Fo Lder manually create a source code folder src.
2. Click Finish, as follows
3. Enter Pydev Perspective, in the Python package Explorer , right-click src, select New->pydev Package , enter the package name py
4. Click Finish, the Python package is created , and the __init__.py file is automatically generated, and the file contains no content.
5. After the Pydev package is created, right-click on the created Packages Py27, select New->pydevmodule, enter the modules name PYc ase1.py Finish. In this way, the Python module is built
11. Write a small item save as pycase1.py after pressing F11, select Python run to execute the script
#-*-coding:utf-8-*- fromSeleniumImportWebdriverImportTimedriver=Webdriver. Ie () Driver.get ('http://www.baidu.com') driver.implicitly_wait (20) driver.find_element_by_id ('kw'). Send_keys ("AA") driver.find_element_by_id ('su'). Click () time.sleep (5) Driver.quit ()
12. Okay, it's done.
Building a SELENIUM+PYTHON+ECLIPSE development environment