全局变量配置: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";