Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Selenium Testing Tools
  • Table Of Contents Toc
Learning Selenium Testing Tools

Learning Selenium Testing Tools - Third Edition

By : Raghavendra Prasad MG
4.4 (11)
close
close
Learning Selenium Testing Tools

Learning Selenium Testing Tools

4.4 (11)
By: Raghavendra Prasad MG

Overview of this book

If you are a software developer with a basic knowledge of testing and are interested in automated testing using Selenium, this is the book for you. No prior knowledge of Selenium is required.
Table of Contents (17 chapters)
close
close
16
Index

The Actions class

The Actions class allows us to build a chain of actions that we would like to perform. This means that we can build up a nice sequence, for example, "Press Shift and type something and then release", or if we want to work with a select that allows multiple selects, we can press Shift and then do the necessary clicks.

We do this by creating an Actions object. We then need to chain some calls together:

// Create Actions object passing in a WebDriver object
Actions builder = new Actions(driver);

// Chain some calls together and call build
Action dragAndDrop = builder.clickAndHold(someElement)
  .moveToElement(otherElement)
  .release(otherElement)
  .build();

// Perform the actions
dragAndDrop.perform();

Drag and drop

We have seen that drag and drop is one of the main things that people want to do with web applications. This allows them to build task boards that allow other people to drag and drop between different states. You may have seen applications like this...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Selenium Testing Tools
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon