Selenium with Java 32 - Actions class sendKeys method explained in detail with code

Publicado em: 06 Julho 2018
no canal de: Ankpro Training
1,937
11

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();
}


Nesta página do site você pode assistir ao vídeo on-line Selenium with Java 32 - Actions class sendKeys method explained in detail with code duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Ankpro Training 06 Julho 2018, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,937 vezes e gostou 11 espectadores. Boa visualização!