1. From write code start, install Eclipse, official website download software, https://www.eclipse.org/downloads/, remember to install Java First, the proposal installs JDK1.7 above.
2. Next you need to write selenium's code,testng code, from selenium, Selenium-server-standalone-2.41.0.jar,testng,testng-6.8.jar download the appropriate jar file and put it in the Eclipse directory.
4. Next you can write selenium code, write good code, use testng framework, testng How to use, here is not detailed, refer to TestNG's official website, add testng comments in code.
The XML file of 5.testNG is as follows, when the execution of this XML file executes the selenium test, and the final result shows how many case to execute successfully and how many failed case.
[HTML] View plain copy <suite name= "Suite1" parallel= "Tests" thread-count= "5" > <test name= "test1" > <parameter name= "Myage" Value= "/> <parameter name=" myname " value=" Abel, "/> <groups> <define name= "Allfunctest" > <include name= "windows.*"/> <include name= "linux.*"/> </define> <define name= "All" > <include name= "Allfunctest"/> <include name= "Functest"/> <exlcude name= "Checkintest"/> </define> <run> <include name= "All"/> <include name= "AA"/> <include Name= "BB"/> <include name= "cc"/> </run> < dependencies> <group name= "AA" depends-on= "BB&NBSP;CC"/> </dependencies>