基于 SELENIUM 的自动化测试架构(32)

发表于:2017-04-11来源:gitbook作者:凌俣Linty?点击数: 标签:selenium
java private BoxDriver baseDriver = null; private String baseUrl = null; private LoginPage loginPage = null; private AdminPage adminPage = null; 调用各种页面(pages) 实例化Page this .login
java private BoxDriver baseDriver = null; private String baseUrl = null; private LoginPage loginPage = null; private AdminPage adminPage = null;
  • 调用各种页面(pages)

    1. 实例化Page
       this.loginPage = new LoginPage(this.baseDriver);
       this.adminPage = new AdminPage(this.baseDriver);
      
    2. 使用page的对象,调用成员方法

           java
           loginPage.open(this.baseUrl);    
           loginPage.changeLanguage(lang);
           loginPage.login("admin", "123456", true);
           loginPage.selectApp(AppType.Admin);
           adminPage.clickAddMemberButton();
           adminPage.addMemberData(member);
       
      
      
      
                 

      原文转自:http://gitbook.cn/books/58e54b57cfcd6fa52dcef1d2/index.html

...