[Webkit-unassigned] [Bug 174616] WebDriver: implement advance user interactions
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 9 22:55:28 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=174616
--- Comment #11 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Brian Burg from comment #9)
> Comment on attachment 339961 [details]
> Updated patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=339961&action=review
>
> r=me, great work!
Thanks!
> > Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp:273
> > +void SimulatedInputDispatcher::run(uint64_t frameID, Vector<SimulatedInputKeyFrame>&& keyFrames, HashSet<Ref<SimulatedInputSource>>& inputSources, AutomationCompletionHandler&& completionHandler)
>
> I am not sure whether the spec allows interacting with elements from
> different frames in the same interaction; it's a bit vague. The actions
> commands will fail if there is not a current browsing context.
>
> EDIT: I think this is correct, because the "get a known element" algorithm
> only looks up elements in the current browsing context. I think this might
> trip up some users, but let's go with this for now.
Right, get a known element says we should look in the current browsing context, but it will be the same for the whole sequence anyway.
> > Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h:119
> > + virtual void viewportInViewCenterPointOfElement(WebPageProxy&, uint64_t frameID, const String& nodeHandle, Function<void (std::optional<WebCore::IntPoint>, std::optional<AutomationCommandError>)>&&) = 0;
>
> This name is a bit awkward, but I can live with it, assuming it computes the
> in-view centre point of the element in viewport coordinate space. If it does
> something else then please clarify :)
That's exactly what it does. It doesn't scroll the view to make the element visible, because the spec doesn't say we should. So, in case the element is not in viewport a target out of bounds error will be generated.
> > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:981
> > + // Start at 2 and use only even numbers to not conflict with m_nextViewportInViewCenterPointOfElementCallbackID.
>
> I'm not a fan of tricks like this. Would it be possible to just have the
> existing Automation command use the Client API?
I'm not sure what you mean exactly. At first I tried to use the computeElementLayout directly, but that requires to use the backend dispatcher, a sequence id, and the backend callback. But we only want to send the message to the web process and get the response as part of an ongoing command.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180510/4341ad76/attachment.html>
More information about the webkit-unassigned
mailing list