public  Map<String,String> readEnvironmentVariables() throws Exception{
		Map<String,String> env = new HashMap<String, String>();
		
		WebDriver driver = login();
		driver.get(driver.getCurrentUrl()+"configure");
		Thread.sleep(1000);
		
		String environmentVariablesScript = "var checkBoxArr = document.getElementsByName('hudson-slaves-EnvironmentVariablesNodeProperty');"
				+ "var checkBox = checkBoxArr[0];"
				+ "var bool = checkBox.getAttribute('checked');"
				+ "if(bool){"
				+ " return true;"
				+ "}else{"
				+ "  return false;"
				+ "}";
		Boolean ifChecked = (Boolean)((JavascriptExecutor)driver).executeScript(environmentVariablesScript);		
		if(!ifChecked){ //没有环境变量
			driver.close();
			return null;
		}
		
		String keyScript = "var inputKey = document.getElementsByName('env.key');"
				+ "return inputKey;"; //获取键
		String valueScript = "var inputValue = document.getElementsByName('env.value');"
				+ "return inputValue;"; //获取值
		@SuppressWarnings("unchecked")
		List<WebElement> keyEles = (ArrayList<WebElement>)((JavascriptExecutor)driver).executeScript(keyScript);
		@SuppressWarnings("unchecked")
		List<WebElement> valueEles = (ArrayList<WebElement>)((JavascriptExecutor)driver).executeScript(valueScript);
		
		for(int i=0;i<keyEles.size();i++){
			// 获取键和值
			env.put(keyEles.get(i).getAttribute("value"), valueEles.get(i).getAttribute("value"));
		}
		
		Path file = Paths.get(ReadPros.getMisc().getProperty("pathEnv")+"jenkinsEnv.properties"); //创建写入文件
		BufferedWriter writer = Files.newBufferedWriter(file, Charset.forName("UTF-8")); //输出流
		String propertyStr; 
		for(int i=0;i<keyEles.size();i++){
			 propertyStr = keyEles.get(i).getAttribute("value")+"="+valueEles.get(i).getAttribute("value");
			 writer.write(propertyStr,0,propertyStr.length());
			 writer.newLine();
		}
		
		writer.flush();
		writer.close();
		driver.close();
		return env;
	}