Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Handling Keyboard events in Selenium Automation II WebDriver Selenium Automation

  • Knowledge Share
  • 2020-12-03
  • 719
Handling Keyboard events in Selenium Automation II WebDriver Selenium Automation
  • ok logo

Скачать Handling Keyboard events in Selenium Automation II WebDriver Selenium Automation бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Handling Keyboard events in Selenium Automation II WebDriver Selenium Automation или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Handling Keyboard events in Selenium Automation II WebDriver Selenium Automation бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Handling Keyboard events in Selenium Automation II WebDriver Selenium Automation

In this session you will be learning the importance of keyboard events in selenium automation and its significance in various applications with examples

You can download this example program by scrolling to the bottom on the description and also you can import the complete example programs from below GitHub Repository
https://github.com/knowledgeshare-tec...
*******************************************************************
You can see step by step selenium sessions from below playlist
*******************************************************************
   • How to handle WebTables using Selenium Web...  

For regular updates you can join this Group
***********************************************
  / 4754296501308288  
****************************************************
Overview on Keyboard Events
****************************************************
What are Keyboard Events

Pressing a Key/Keys on a Keyboard (or) user interaction with the keyboard

Different ways to automate Keyboard Events
Using sendKeys() method of WebElement class
Using Actions class
Using Robot class
What is the use to handle this Keyboard events
To perform Copy & Paste ( Control + c, Control + v)
Holding keys like Shift , Alt, F1 to F12 to perform some operations on Application
When mouse clicks are not happening in any applications
Mostly used to press Tab and Enter Keys in a form etc.,
***********************************************************
Example program for handling Keyboard Events.
***********************************************************
package com.seleniumbasics;

import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Actions;

public class Keyboard_Events {

public static void main(String[] args) throws AWTException, InterruptedException
{
System.setProperty("webdriver.chrome.driver", ".\\drivers\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.navigate().to("http://demowebshop.tricentis.com/regi...");

driver.manage().window().maximize();

driver.findElement(By.id("gender-male")).click();

//Method - 1
/*
Actions action=new Actions(driver); action.sendKeys(Keys.TAB);
action.sendKeys("test1"); action.sendKeys(Keys.TAB);
action.sendKeys("test2"); action.sendKeys(Keys.TAB);
action.sendKeys("[email protected]"); action.sendKeys(Keys.ENTER);
action.build().perform();
*/

//Method - 2
Actions action=new Actions(driver);
action.sendKeys(Keys.TAB)
.sendKeys("test1")
.sendKeys(Keys.TAB)
.sendKeys("test2")
.sendKeys(Keys.TAB)
.sendKeys("[email protected]")
.sendKeys(Keys.ENTER)
.build().perform();

//Using Robot Class - java based class

Robot robot=new Robot();

robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);

robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);

Thread.sleep(3000);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);

}

}

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]