Skip to content

Add "Drag And Drop To Frame" keyword for cross-frame drag-and-drop#1953

Open
b-vamsipunnam wants to merge 2 commits intorobotframework:masterfrom
b-vamsipunnam:feature/drag-and-drop-to-frame
Open

Add "Drag And Drop To Frame" keyword for cross-frame drag-and-drop#1953
b-vamsipunnam wants to merge 2 commits intorobotframework:masterfrom
b-vamsipunnam:feature/drag-and-drop-to-frame

Conversation

@b-vamsipunnam
Copy link
Copy Markdown
Contributor

@b-vamsipunnam b-vamsipunnam commented Dec 14, 2025

Summary

This PR adds a new keyword Drag And Drop To Frame that reliably supports dragging an element from the main document into a target element inside an iframe.

Motivation

While automating post-deployment tasks in a Salesforce Service Cloud setup flow, I encountered a limitation where drag-and-drop interactions failed when the drop target resided inside an iframe. The existing keywords could not handle this scenario because the WebDriver action chain loses context when switching into an iframe mid-action.

Real-world scenario: Salesforce Service Cloud application

  • Login → Setup → All Sites → Builder → Select Dashboard → Drag and drop a component into the target section (inside an iframe) → Publish → Confirm publish.
  • The existing Drag And Drop keywords failed because the target is inside an iframe.

This limitation aligns with

By introducing this keyword, the drag-and-drop flow can now be reliably automated end-to-end.

Changes:

  • Added implementation in src/SeleniumLibrary/keywords/element.py
  • Added acceptance tests in atest/acceptance/keywords/draganddropframe.robot
  • Added test HTML page atest/resources/html/frames/draganddrop.html
  • Updated unit test keyword count in utest/test/api/test_plugins.py

All acceptance tests pass locally, including the new cross-frame scenarios.

All acceptance tests pass locally (including new ones).

This is a non-trivial enhancement — please add the acknowledge label to #120 for release notes credit. Thank you!

@b-vamsipunnam b-vamsipunnam force-pushed the feature/drag-and-drop-to-frame branch from 91af1a0 to d283eb4 Compare December 20, 2025 21:16
@emanlove emanlove self-assigned this Dec 20, 2025
@b-vamsipunnam b-vamsipunnam changed the title Feature: Add New keyword Drag And Drop To Frame Add New keyword "Drag And Drop To Frame" Mar 30, 2026
@b-vamsipunnam b-vamsipunnam force-pushed the feature/drag-and-drop-to-frame branch from d283eb4 to bf869a0 Compare April 11, 2026 16:56
@b-vamsipunnam b-vamsipunnam changed the title Add New keyword "Drag And Drop To Frame" Add "Drag And Drop To Frame" keyword for cross-frame drag-and-drop Apr 11, 2026
@b-vamsipunnam
Copy link
Copy Markdown
Contributor Author

Hi @emanlove ,
I’ve updated the PR to align with the project’s keyword signature to use the new Locator type alias, and the PR is now scoped to:

  • The new Drag And Drop To Frame keyword implementation
  • Then updated acceptance tests

All tests are now passing in GitHub Actions. Please take another look when you have a chance. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants