SELENIUM BASICS:

  • What is Automation Testing - Advantages & Types of Tools
  • What is Selenium IDE, Selenium RC, Selenium WebDriver, Selenium Grid?
  • Selenium IDE, Firebug & Firepath Installation

  • SELENIUM WEBDRIVER:

  • Selenium WebDriver Architecture
  • Selenium Installation
  • Challenges and Limitations of Selenium
  • First Selenium WebDriver Script
  • Working with Firefox Browser
  • Solution - Failed To Launch Browser Using Selenium WebDriver
  • Working with Chrome Browser
  • Working with IE Browser
  • Difference Between FindElement & FindElements
  • Install Firebug, Fire path and other add on for Selenium
  • Locators in Selenium
  • Dynamic Xpath
  • Dynamic CSS
  • Handle drop-downs
  • How to work with file upload
  • Handle Alerts & Popups
  • Handle Multiple Windows
  • Mouse Hover event in Selenium
  • Right Click
  • Double Click
  • Drag and Drop
  • Capture Screenshots in Selenium
  • Parameterization
  • Synchronization
  • Implicit Wait, Explicit Wait and Fluent Wait in Selenium
  • Implicit Waits
  • Explicit WebDriver Waits
  • Fluent Wait In Selenium
  • Apache POI
  • How To Read Data From Excel File
  • How To Write Data In Excel File
  • Database Testing Using MSSQL
  • Database Testing Using MySQL
  • Database Testing Using DB2
  • Handle Ajax Call in Selenium
  • Listeners in Selenium
  • Handling JavaScript in Selenium
  • Stale Element Reference Exception in Selenium
  • Integrate Sikuli with Selenium
  • Headless Browser Testing 
  • Headless Browser Testing using HtmlUnitDriver
  • Headless Browser Testing using PhanthomJSDriver

  • TESTNG:

  • TestNG Installation
  • TestNG Complete Tutorial

  • REPORTS:

  • Extent Reports Introduction
  • Extent Reports Generation
  • Capturing Screenshots & Including In Extent Reports
  • Extent Reports Version 4

  • BUILD & CONTINUOUS INTEGRATION TOOLS:

  • ANT Build Tool - How To Download & Install
  • Maven Build Tool - How To Download & Install
  • Creating Maven Selenium Project
  • GIT Integration with Selenium
  • Jenkins - How To Download & Install
  • Jenkins - Executing TestNG Scripts
  • Jenkins - Generating Reports After Test Execution
  • Jenkins - Executing Maven Project
  • Create build and Execute build for nightly execution
  • Send Email report based on build Status
  • Selenium Continuous Integration with Jenkins [Selenium – Maven – Git – Jenkins] – Step By Step Guide

  • CROSS BROWSER TESTING:

  • Running Selenium Tests On BrowserStack
  • Kobiton - Mobile Testing Platform with Real Devices

  • MOBILE TESTING:

  • Mobile Testing Platform with Real Devices

  • AUTOMATION FRAMEWORKS:

  • What is Framework & Types of Framework
  • Page Object Model Design Pattern
  • Data Driven Framework
  • How to explain Test Automation Framework or Selenium Automation Framework Architecture In Interview

  • API Testing:

  • Learn API Testing
  • Postman Tutorial (API Testing with Postman)

  • INTERVIEW QUESTIONS:

  • Test Automation Framework Interview Questions
  • Selenium Interview Questions
  • TestNG Interview Questions
  • Java Interview Questions
  • Python Interview Questions
  • API Testing Interview Questions

  • SAMPLE RESUME:

  • Automation Tester Resume
  • How To Handle Mouse and Keyboard Interactions in Selenium Python

    In the previous articles on Selenium Python Tutorial, we have covered “How To Handle Child Window, Frames, Alerts in Selenium Python“. In this tutorial, we will learn How To Handle Mouse & Keyboard Interactions in Selenium Python. 

    The mouse and keyboard movements can be simulated with the help of Selenium WebDriver. The actions like a double click, right-click, mouse movement, key press, mouse button connection, hovering and drag and drop and so on are performed with the help of ActionChains class in Selenium.

    While we are using methods of ActionChains object, all the actions are kept in a queue. After executing the perform () method, all the actions are triggered one by one in a sequence. The actions can be queued up one after the other or placed in a chained order.

    Syntax with queueing the actions.

    Syntax with chaining the actions.

    Let us see some of the mouse actions methods under ActionChains:

    click (args) – This method shall click on a web element. The argument args is the web element to be clicked. If the parameter to the method is ignored, then the current mouse position is clicked.

    click_and_hold (args) – This method shall click on the current mouse location without releasing it. The argument args is the web element to mouse down. If the parameter to the method is ignored, then the current mouse position is clicked.

    double_click (args) – This method shall double click on a web element. The argument args is the web element to be double-clicked. If the parameter to the method is ignored, then the current mouse position is double-clicked.

    context_click (args) – This method shall right click on a web element. The argument args is the web element to be right-clicked. If the parameter to the method is ignored, then the current mouse position is right-clicked.

    drag_and_drop (s, d) – This method is used to hold down the mouse from the element at the source, then move to the destination element and finally release the mouse. The argument s refers to the location of the source element to mouse down and the argument d refers to the location of the destination to mouse up.

    drag_and_drop_by_offset (s, offsetX, offsetY) – This method is used to hold down the mouse from the element at the source, then move to the destination element offset, and finally release the mouse. The argument s refers to the location of the source element to mouse down. The argument offsetX refers to the X offset to move to. The argument offsetY refers to the Y offset to move to.

    move_to_element (args) – This method is used to move to the middle of the web element. The args is the web element to be moved to.

    release (args) – This method is used to release a held mouse button on a web element. The argument args is the web element to mouse up. If the parameter to the method is ignored, then the current mouse position is released.

    Let us see some of the keyboard methods under ActionChains:

    send_keys (keys) – This method is used to send keys to the present active element. The argument keys are keys to send. The modifier keys are available from the Keys class.

    key_down (v, args) – This method is used to do a key press without releasing it. This method can be used only with the Control, Alt, and Shift modifier keys. The argument v is a modifier key available from the Keys class. The argument args is the web element to send keys. If that parameter to the method is ignored, it sends keys to the present active element.

    key_up (v, args) – This method is used to release a modifier key. The argument v is a modifier key available from the Keys class. The argument args is the web element to send keys. If that parameter to the method is ignored, it sends keys to the present active element.

    Code Implementation for mouse hover action.

    Code Implementation for drag and drop action.

    Code Implementation for right-clicking action.

    Code Implementation for double-clicking action.

    Code Implementation for clicking action.

    Code Implementation for key up and down action.

    In the next article, we will learn Assertions in Selenium Python

    Related posts:

    Get our latest blog posts delivered to your inbox

    Subscribe and get popular blog posts about software testing industry.

    Rajkumar

    Leave a Comment

    Share via
    Copy link
    Powered by Social Snap