1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | public static void startTrans(WebDriver driver, String transName) { mapPool.put(transName, System.currentTimeMillis()); } public static void endTrans(WebDriver driver, String transName) throws \ InterruptedException, IOException { long endtime = System.currentTimeMillis(); long starttime = mapPool.get(transName); String timestamp =String.valueOf(endtime-starttime); FileWriter writer = new FileWriter(seleniumResult,true); writer.append(transName + "," + timestamp+"," ); writer.close(); mapPool.remove(transName); } driver.findElement(By.id("username")).sendKeys(userName); driver.findElement(By.id("password")).sendKeys(passWord); startTrans(driver,"login"); driver.findElement(By.xpath("//INPUT[contains(@class, \ 'lotusBtn lotusBtnSpecial')]")).click(); endTrans(driver,"login"); |
1 2 | ipfw add pipe 2 ip from %sourceip% to %targetip% out proto ip ipfw pipe 2 config delay 300ms bw 2Mbit/s |
1 2 3 4 5 6 | public void start() { selenium = new DynaTraceSelenium("localhost", 4444, "*iexplore", "http://localhost:9090"); selenium.start(); } |
1 | java -jar selenium-server-standalone-2.14.0.jar -role hub |
1 2 3 4 | java -jar selenium-server-standalone-2.14.0.jar -role node \ -hub http://remotehost:4444/grid/register \ -browser browserName=firefox,version=3.6,maxInstances=3,\ platform=LINUX |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |