use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class ExplicitWaitTime method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement element = (new WebDriverWait(driver, 10)).until(new ExpectedCondition<WebElement>() {
@Override
public WebElement apply(WebDriver d) {
return d.findElement(By.name("q"));
}
});
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class Back method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://www.google.com");
driver.get("http://www.yahoo.com");
driver.navigate().back();
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class Forward method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://www.google.com");
driver.get("http://www.yahoo.com");
driver.navigate().back();
driver.navigate().forward();
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class NavigateTo method main.
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://www.google.com");
}
use of org.openqa.selenium.firefox.FirefoxDriver in project java.webdriver by sayems.
the class ActionBuildPerform2 method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/selectable.html");
WebElement one = driver.findElement(By.name("one"));
WebElement three = driver.findElement(By.name("three"));
WebElement five = driver.findElement(By.name("five"));
// Add all the actions into the Actions builder.
Actions builder = new Actions(driver);
builder.keyDown(Keys.CONTROL).click(one).click(three).click(five).keyUp(Keys.CONTROL);
// Perform the action.
builder.perform();
}
Aggregations