Package org.openqa.selenium

Examples of org.openqa.selenium.WebDriver.quit()


    System.out.printf("now accesss %s \n", url);
    dr.get(url);
    Thread.sleep(2000);
   
    System.out.println("browser will be close");
    dr.quit()
  }

}
View Full Code Here


  public static void main(String[] args) {
    WebDriver dr = new ChromeDriver();
    dr.manage().window().setSize(new Dimension(240, 320));
    dr.get("http://www.3g.qq.com/");
    dr.quit();
  }

}
View Full Code Here

   
    System.out.println(dr.findElement(By.tagName("h3")).getCssValue("font"));
   
    Thread.sleep(1000);
    System.out.println("browser will be close");
    dr.quit()
  }

}
View Full Code Here

   
    dr.findElement(By.cssSelector("input[type=file]")).sendKeys("src/navs.html");
   
    Thread.sleep(1000);
    System.out.println("browser will be close");
    dr.quit()
  }

}
View Full Code Here

    WebElement current = dr.findElement(By.className("breadcrumb")).findElement(By.className("active"));
    System.out.println(current.getText());
   
    Thread.sleep(1000);
    System.out.println("browser will be close");
    dr.quit()
  }

}
View Full Code Here

    dr.manage().addCookie(c1);
    dr.manage().addCookie(c2);
   
    System.out.println("browser will be close");
   
    dr.quit()
  }

}
View Full Code Here

    System.out.printf("forward to  %s \n", secondUrl);
    dr.navigate().forward();
    Thread.sleep(1000);
   
    System.out.println("browser will be close");
    dr.quit()
  }

}
View Full Code Here

    WebElement menu = dr.findElement(By.id("dropdown1")).findElement(By.linkText("Another action"));
    (new Actions(dr)).moveToElement(menu).perform();
   
    Thread.sleep(1000);
    System.out.println("browser will be close");
    dr.quit()
  }

}
View Full Code Here

//    ͨ��ul�ٲ㼶��λ
    dr.findElement(By.className("dropdown-menu")).findElement(By.linkText("watir-webdriver")).click();
   
    Thread.sleep(1000);
    System.out.println("browser will be close");
    dr.quit()
  }

}
View Full Code Here

    System.out.println(alert.getText());
    alert.accept();
   
    Thread.sleep(1000);
    System.out.println("browser will be close");
    dr.quit()
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.