Bird
0
0

You want to verify that a drag and drop action moved an item from a list to a cart on a webpage. Which approach is best to confirm the drop was successful in Selenium Java?

hard📝 Application Q15 of 15
Selenium Java - Actions Class
You want to verify that a drag and drop action moved an item from a list to a cart on a webpage. Which approach is best to confirm the drop was successful in Selenium Java?
ACheck the page title has changed after drag and drop
BVerify the source element is still visible after drop
CCheck that the cart element contains the dragged item's text after drop
DConfirm the browser URL changed after drag and drop
Step-by-Step Solution
Solution:
  1. Step 1: Understand what changes after drag and drop

    The dragged item should appear inside the cart element, so its text should be present there.
  2. Step 2: Evaluate verification methods

    Checking source visibility (B) might not confirm drop; page title (C) and URL (D) usually do not change after drag and drop.
  3. Final Answer:

    Check that the cart element contains the dragged item's text after drop -> Option C
  4. Quick Check:

    Verify drop by checking target content [OK]
Quick Trick: Verify drop by checking target element's content [OK]
Common Mistakes:
  • Checking unrelated page properties like title or URL
  • Assuming source element visibility confirms drop
  • Not verifying target element content

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Java Quizzes