-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement drag and drop functionality #1290
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work 👍 I have a question.
func (l *Locator) DragTo(target *Locator) error { | ||
l.log.Debugf("Locator:DragTo", "fid:%s furl:%q sel:%q target:%q", l.frame.ID(), l.frame.URL(), l.selector, target.selector) | ||
|
||
if err := l.dragTo(target); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this just call l.frame.DragAndDrop(l.selector, ...)
?
Why do we need "@@locator"
in mapping.go
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this just call l.frame.DragAndDrop(l.selector, ...)?
I started out by implementing dragTo
and then discovered the dragAndDrop
functions on Page
and Frame
. I've implemented those functions, but this initial attempt hanged around. Now that those are working, I'm back to implementing dragTo
on top of those functions.
Why do we need "@@locator" in mapping.go?
Since dragTo
accepts a locator instance as its first argument, we need to get the selector of that other instance. I'm going to change this to be the selector and not the whole locator.
What?
This PR implements drag and drop functions on Page, Frame and Locator.
Why?
There's a gap in functionality where it's not possible to easily test applications relying on the HTML drag-and-drop API:s.
Checklist
Related PR(s)/Issue(s)
Closes #336
Closes #1118
Closes #378