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

全局变量配置: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
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值