Web UI Automation testing requires work: Eclipse (Java compiler), selenium (library file), Webdriver (browser-driven), testng Lib;
First step: Deploy the Bad environment first, download Selenium's Selenium-server-standalone-3.8.1.jar package, import into eclipse;
Step Two:
Install three major browser driver driver (Firefox, CHROME, respectively). IE, you can download one of them)
1.chromedriver:https://code.google.com/p/chromedriver/downloads/list
2.Firefox Drive geckodriver:https://github.com/mozilla/geckodriver/releases/
3.IE Drive iedriver:http://www.nuget.org/packages/selenium.webdriver.iedriver/
Step Three:
TestNG Lib: Drag directly into eclipse
Http://marketplace.eclipse.org/content/testng-eclipse
Fourth step: Establish TestNG class;
Use of annotations: managing the execution of use cases through annotations,
@beforeMethod: A statement executed before a use case executes: a fairly environment-friendly configuration
@afterMethod: After the execution of the use case, the execution of the statement, quite a recovery of the environment
@test: The body of a use case
Then write the test case;
Fifth step: Create an XML file to specify the order of execution
Finally, we can see the results and reports of the implementation;
After execution, the results of use cases can be seen in the console of Eclipse, in more detail in the working directory Test-outputz
e:\android\testngtest\test-output:emailable-report.html;index.html;
Selenium_webdriver+java+testng Getting Started UI Automation