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();
}
На этой странице сайта вы можете посмотреть видео онлайн Selenium with Java 32 - Actions class sendKeys method explained in detail with code длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Ankpro Training 06 Июль 2018, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,937 раз и оно понравилось 11 зрителям. Приятного просмотра!