public void fn_sendKeys() {
String strURL;
WebElement txtGoogle;
WebDriver firefox=new FirefoxDriver();
strURL="www.google.com"
firefox.get(strURL);
txtGoogle=firefox.findElement(By.name("q"));
txtGoogle.sendKeys(Keys.CONTROL,"G");//Sending Ctrl+G key combination
}
No comments:
Post a Comment