添加testng suite
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="false">
<test name="Test">
<classes>
<class name="baidu.openlinkTest"/>
<class name="baidu.openlinkTest1"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
执行case:
结果如下
[TestNG] Running:
C:UsersYoungworkspaceseleniumsrcaidu estng.xml
http://www.baidu.com
Starting ChromeDriver (v2.9.248315) on port 28218
save snapshot path is:E:/open_baidu.png
screen shot finished
save snapshot path is:E:/input_keyWord.png
screen shot finished
(858, 179)
Selenium - Web Browser Automation
save snapshot path is:E:/open_bake.png
screen shot finished
Selenium - Web Browser Automation
http://docs.seleniumhq.org/
------------END----------------------
http://www.baidu.com
Starting ChromeDriver (v2.9.248315) on port 5568
save snapshot path is:E:/open_baidu.png
screen shot finished
save snapshot path is:E:/input_keyWord.png
screen shot finished
(858, 179)
Selenium_百度百科
save snapshot path is:E:/open_bake.png
screen shot finished
Selenium_百度百科
http://baike.baidu.com/subview/478050/6464537.htm?fr=aladdin
------------END----------------------
===============================================
Suite
Total tests run: 2, Failures: 1, Skips: 0
===============================================