抟扶

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

1. testng的测试方法不能有返回值,即必须是void返回值类型。

测试方法前加入了@Test, 但以testNG方式运行,run test为0

以下public WebDriver ...应改为public void ...

@Test
public WebDriver webRegister() throws InterruptedException, IOException{
        
        WebRegister wr = new WebRegister();
        
        webRegisterURL = wr.getRegisterData("webRegisterURL");
        userName = wr.getRegisterData("userName");
        userPwd = wr.getRegisterData("userPwd");
        userPwdck = wr.getRegisterData("userPwdck");
        userPhone = wr.getRegisterData("userPhone");
        successStringCk = wr.getRegisterData("successStringCk");
        outComePath = CommonClass.getBaseData(testDataPath, "outComePath");
        screenshotDir = CommonClass.getBaseData(testDataPath, "screenshotDir");
        Logger.getLogger(WebRegister.class).info(
                "-------------------register start--------------------------");
        
        WebDriver driver = CommonClass.startBrowser("chrome");
     ...

 

posted on 2015-10-19 16:55  抟扶  阅读(277)  评论(0编辑  收藏  举报