1. Download and install the JDK, configure the environment variables;
2. Download and install Python;
3. Install Selenium, execute PIP install-u under the installed Python path D:\Program files\python34\scripts Selenium
4. Download Eclipse, install Pydev:help-install New software online in Eclipse. -add, input Http://pydev.org/updates
After the 5.pydev installation, configure the Python interpreter in Eclipse: Window > Preferences > Pydev > Interpreter-python. Click New to select the installed Python.exe
6.Eclipse, select File > New > Project > Pydev > Pydev project;
7. After the project is created, create a py file:
#-*-Conding=utf-8-*-
From selenium import Webdriver
if __name__ = = "__main__":
Driver = Webdriver. Firefox ()
Driver.implicitly_wait (30)
Driver.get ("http://www.baidu.com")
driver.find_element_by_id ("kw"). Send_keys ("Selenium")
driver.find_element_by_id ("su"). Submit ()
Driver.quit ()
Run.
Selenium+eclipse+python Environment