Actions class sendKeys method explained in detail with code.
Like our facebook page www.facebook.com/ankprotraining
sendKeys method in Actions class :
sendKeys(CharSequence key)- Sends a sequence of keystrokes to the browser.
sendKeys(WebElement target, CharSequence key)- Sends a sequence of keystrokes to the specified element in the browser.
Possible Interview Questions on selenium actions class sendkeys :
How to use selenium actions class sendKeys method?
How to send tab key in selenium?
How to send control key in selenium?
Code :
@Test
public void actionsSendKeys() throws InterruptedException
{
WebDriver driver = new FirefoxDriver();
driver.get("http://www.uitestpractice.com/Student...");
Actions actions=new Actions(driver);
// actions.sendKeys(Keys.END)
// .perform();
//
// Thread.sleep(2000);
//
// actions.sendKeys(Keys.HOME)
// .perform();
actions.sendKeys(driver.findElement(By.name("click")),Keys.ENTER)
.build()
.perform();
Thread.sleep(2000);
driver.quit();
}
On this page of the site you can watch the video online Selenium with Java 32 - Actions class sendKeys method explained in detail with code with a duration of hours minute second in good quality, which was uploaded by the user Ankpro Training 06 July 2018, share the link with friends and acquaintances, this video has already been watched 1,937 times on youtube and it was liked by 11 viewers. Enjoy your viewing!