How To Handle Keyboard & Mouse Events Using Action Class In Selenium WebDriver http://teachyourselftestautomation.com
Selenium Certification Training: http://bitly.com/2PA8HCA
Hello and welcome to Day 25 - How To Handle Keyboard & Mouse Events Using Action Class In Selenium WebDriver
Today we are teaching ourselves How To Handle Keyboard & Mouse Events Using Action Class In Selenium WebDriver
Practice site - https://wwww.amazon.co.uk
Keyboard & Mouse Events are actions you carry out with the keyboard and mouse as a user and how selenium handles theses sort of actions
An example will be user hoovers over an element which reveals a drop down list or right click on the mouse for drop down options to interact with elements
Others would be double click to select text within a text box or press shift key to write on caps
Action class handles or contains all the methods that selenium webdriver needs to automate these keyboard
and mouse actions
You will have to start by defining your action class
Some Action class types are; click and hold, key down, key up, move to element, double click etc...
Using these actions on a single line of code is called composite actions
Examples we will see is hovering over and element, writing in capitals and selecting text by double clicking on mouse
In eclipse we want to do live examples
Create an object for action class Actions a=new Actions(driver);
a.moveToElement(driver.findElement(By.xpath("//*[@id=\"twotabsearchtextbox\"]"))).click()
.keyDown(Keys.SHIFT).sendKeys("shoes").doubleClick().build().perform();
Every time you write a line of code for action methods always remember to build and perform which will executes the line of code
Practice and more practice selenium webdriver to carry out automation for everyone that is in your team
Please see video for live examples on the above
Don't forget to subscribe if you found this video helpful, support the channel and SUBSCRIBE
Many Thanks
Kevin Owasu Itoe
How To Handle Keyboard & Mouse Events Using Action Class In Selenium WebDriver http://teachyourselftestautomation.com
--------------------------------------------------------------------------------------------------------
#testautomation #teachyourselftestautomation #selenium #webdriver #java
--------------------------------------------------------------------------------------------------------
Follow me @
Facebook: / kevin.itoe.50
Google+: https://plus.google.com/u/0/103559195...
Pinterest: https://www.pinterest.co.uk/owasuik/
My Blog: http://teachyourselftestautomation.com/
My YouTube Channel: / @teachyourselftestautomatio1271
--------------------------------------------------------------------------------------------------------
My Videos:
• Install And Configure Java | Selenium...
• Eclipse Installation | eclipse softwa...
• Java Project Template | Java Projects...
• Download And Configure Selenium | Sel...
• Basic Selenium Test Script To Invoke ...
• Selenium Tutorial | WebDriver Browser...
• Selenium Webdriver Locators | Locator...
• Find Elements On Web Page With Link T...
• How To Validate Xpath And CSS Using B...
• How To Write Customized Xpath In Sele...
• CSS Selector | How To Write Custom CS...
• Preceding-Sibling Xpath | How To Iden...
• How To Handle Static Dropdown Seleniu...
• What Is The Difference Between Absolu...
• Video
• How To Automate Selecting A Checkbox ...
• How To Automate Radio Button In Selen...
• How To Handle Radio Buttons Dynamical...
• How To Handle Alert In Selenium WebDr...
• How To Check Visibility Of Web Elemen...
• How To Handle Calendar In Selenium We...
• How To Manage The Synchronization In ...
• How To Handle Keyboard & Mouse Events...
-------------------------------------------------------------------------------------------------------
What Wikipedia says about selenium: https://en.wikipedia.org/wiki/Seleniu...)
What Wikipedia says about test automation: https://en.wikipedia.org/wiki/Test_au...