[Webkit-unassigned] [Bug 174497] Web Automation: FindNodes should throw an error in case of invalid strategy

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 14 09:08:51 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=174497

--- Comment #8 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Brian Burg from comment #7)
> Comment on attachment 315411 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=315411&action=review
> 
> r=me
> 
> This does not affect safaridriver because it validates the strategy argument
> prior to calling the atom. But this shouldn't do any harm, either.

I thought about doing the same, but since the atom is already doing the check and it's actually a corner case in the end, it's simpler to let the atom handle it.

> > Source/WebKit/UIProcess/Automation/atoms/FindNodes.js:55
> > +        // 12.2 Find Element and 12.3 Find Elements: If location strategy is not present as a keyword
> 
> Please write section numbers like §12.2 if possible. and mention step 4. I
> don't think you need to include the URL here if it's in the commit message
> for the change.

Ok. I'll have to update the web driver patch to use § too . . . 

> > Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:277
> > +        else if (exceptionName->string() == "InvalidParameter")
> 
> As long as this maps to "invalid argument", then this should be fine to
> reuse.

Yes, I have this in web driver:

if (errorName == "MissingParameter" || errorName == "InvalidParameter")
    m_errorCode = ErrorCode::InvalidArgument;

-- 
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/20170714/5adfc01d/attachment.html>


More information about the webkit-unassigned mailing list