@SuppressWarnings("unchecked")
	public void setUpBeforeClass() throws Exception {
		// settings
		String ChromeDriverPath = "driver\\chromedriver.exe";
		String application_url = "";
		String browser = "";
	
		//框架开始前先读取测试用例并生成XML格式用例
		ReadExcel re = new ReadExcel();
		re.readExcel();
		CreateXML.generateXmlFile();
		
		
		//获取用例文件的路径
		String ucXMLFile = System.getProperty("user.dir") + File.separator + "UseCases" + File.separator + "xml" + File.separator +CreateXML.xmlCase;

		try {
			System.out.println("测试用例XML文件位置::" + ucXMLFile);
			document = new SAXReader().read(new File(ucXMLFile));
		} catch (DocumentException e) {
			log.toLog(e.toString());
			e.printStackTrace();
		}
		root = document.getRootElement();
		// settings element
		//读取XML中的配置信息
		settings = root.element("SETTINGS");
		if (settings != null) {
			//测试使用的浏览器
			browser = settings.attributeValue("browser");
			//测试网址
			application_url = settings.attributeValue("application_url");
			//设置延时
			timeout = Integer.parseInt(settings.attributeValue("timeout"));
		}

		// TEST element
		testElm = root.element("TEST");
		System.out.println("测试用例名称为::" + testElm.attributeValue("name"));
		System.out.println("延时设置为::" + timeout + "秒");
		
		if(browser.equals("Chrome")){
			System.setProperty("webdriver.chrome.driver",ChromeDriverPath);
			driver = new ChromeDriver();
			
		}
		if(browser.equals("IE")){
			driver = new InternetExplorerDriver();
		}
		if(browser.equals("Firefox")){
			driver = new FirefoxDriver();
		}
		
		System.out.println("正在启动TS_AutoTest框架。。。");
		stepsNodes = testElm.element("STEPS").elements();
		driver.get(application_url);
		driver.manage().window().maximize();
		driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
	}