关闭

Selenium+Java+Appium+TestNg环境搭建——Web自动化测试与HTML5测试(2)

607人阅读 评论(0) 收藏 举报
分类:

全局变量配置:Web端

public final class Consts {

    /**
     * <b>Name:</b> Consts</br>
     * <b>Description:</b> This is a constant class includes the following:<br>
     * 1.General constants.<br>
     * 2.Browsers constants.<br>
     * 3.Constants parameters for run a test<br>
     * @author <i>Ron Zhang</i>
     */
    private Consts() {
        throw new AssertionError("This is a constant class.");
    }

    // *********************************************
    // General constants
    // *********************************************
    public static final String PAGETOLOAD = "20000000";
    public static final String PAGETOLOAD_MAX = "9000000";

    // *******************************
    // Titles,messages,link's name and texts
    // *******************************
    public static final String LEFT_SQ_BRACKET = "]";
    public static final String RIGHT_SQ_BRACKET = "[";
    public static final String LEFT_SQ_BRACKET_WITH_QUOTES = "']";

    // *****************************************
    // Browsers constants
    // *****************************************
    public static final String IE = "*iexplore";
    public static final String IEPROCESS = "iexplore.exe";
    public static final String IEDRIVERP = "IEDriverServer.exe";
    public static final String FF = "*firefox";
    public static final String FFPROCESS = "firefox.exe";
    public static final String SF = "*safari";
    public static final String CR = "*googlechrome";
    public static final String CRPROCESS = "chrome.exe";
    public static final String CRDRIVERP = "chromedriver.exe";

    // *****************************************
    // Constants for run a test (it should be in a data and config)
    // *****************************************
    /** Definition of the browser type */
    public static final String startBrowser = CR;
    public static final String FF_PROFILE_PATH = "C:/SeleniumProfile";
    // public static final String FF_PROFILE_PATH = "./TestData";
    public static final String LIB_PATH = "./lib";

    // *****************************************
    // Constants of the pages URL
    // *****************************************
    /** URL of the http://www.zennioptical.com/ */
    public static final String URL_ZENNIE_SITE = "http://www.zennioptical.com";
    public static final String URL_ZENNIE_PASSWORD="https://www.zennioptical.com/forgotPwd";
    public static final String TEST_DATA_FILE = "TestCase_Data";

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:61762次
    • 积分:4886
    • 等级:
    • 排名:第6021名
    • 原创:451篇
    • 转载:0篇
    • 译文:1篇
    • 评论:0条