Mouse hover Action using Java in Selenium Webdriver |

Поділитися
Вставка
  • Опубліковано 4 лют 2023
  • In automation, many times it is required to perform some action on the element which gets visible only on mouse hover on some other element. For this, mouse cursor needs to be placed over an element. Actions class provides a rich set of APIs for mouse events and #keyboard events. So, to perform mouse event also, #actions class provides #movetoElement methods.
    So, here are the methods Actions class has provided for Mouse Hover action:
    moveToElement(WebElement target)
    moveToElement(WebElement target, int xOffset, int yOffset)
    Note: Action class is present in package: #org.openqa.selenium.interactions package
    Reference websites: www.selenium.dev/selenium/doc...
    www.flipkart.com/
    #framework #selenium #actionsclass #actionapi #webdriver #movetoelement #flipkart #automationtesting #seleniumframework #actionsclass #testng #testrunner #moveToElement #api

КОМЕНТАРІ • 5

  • @RahulMishra-yb8yh
    @RahulMishra-yb8yh Рік тому

    Hi Sir, Thanks for the video it really helped me to understand the concept in short duration.

  • @sourabyadav3104
    @sourabyadav3104 Рік тому

    try to create your own XPath

    • @sdetadda
      @sdetadda  Рік тому +1

      Sourabh, xpath construction is covered in another video uploaded in this channel. Thanks.

    • @alokranjan6224
      @alokranjan6224 2 місяці тому

      Send the link where u have created xpath

    • @sdetadda
      @sdetadda  2 місяці тому

      ​@@alokranjan6224You can either inspect the particular web element and construct the xpath or use the selectorhub plugin which will help you get xpath for any elements on the webpage/DOM.