use of org.openqa.selenium.chrome.ChromeDriver in project java.webdriver by sayems.
the class Click 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 jse = (JavascriptExecutor) driver;
driver.findElement(By.id("gbqfq")).sendKeys("Selenium");
jse.executeScript("document.getElementById('gbqfba').click();");
}
Aggregations