use of org.openqa.selenium.chrome.ChromeDriver in project java.webdriver by sayems.
the class GetTitle method main.
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.navigate().to("http://www.google.com");
JavascriptExecutor js = (JavascriptExecutor) driver;
System.out.println(js.executeScript("return document.title"));
}
use of org.openqa.selenium.chrome.ChromeDriver in project java.webdriver by sayems.
the class ScrollUpDown method main.
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.navigate().to("http://www.google.com");
JavascriptExecutor js = (JavascriptExecutor) driver;
// Scroll up
js.executeScript("scroll(250, 0)");
// Scroll down
js.executeScript("window.scrollBy(0,250)", "");
}
use of org.openqa.selenium.chrome.ChromeDriver in project BuildRadiator by BuildRadiator.
the class RadiatorWebDriverTest method sharedForAllTests.
@BeforeClass
public static void sharedForAllTests() {
// Keep the WebDriver browser window open between tests
DRIVER = new ChromeDriver();
FWD = new FluentWebDriver(DRIVER);
}
Aggregations