Bug 180187 - WebDriver: locator strategy should be validated before trying to find elements
Summary: WebDriver: locator strategy should be validated before trying to find elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-30 03:17 PST by Carlos Garcia Campos
Modified: 2017-11-30 05:50 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.34 KB, patch)
2017-11-30 03:19 PST, Carlos Garcia Campos
clopez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-11-30 03:17:24 PST
We currently rely on the js atom to raise an exception in case the locator strategy is not valid, but in case of find element from element, if the element doesn't exist we fail with stale element error instead of invalid argument as expected. So, let's validate the strategies when parsing them, which would also avoid going to the browser in cae of invalid strategy.
Comment 1 Carlos Garcia Campos 2017-11-30 03:19:20 PST
Created attachment 327964 [details]
Patch
Comment 2 Carlos Garcia Campos 2017-11-30 05:48:56 PST
Committed r225326: <https://trac.webkit.org/changeset/225326>
Comment 3 Radar WebKit Bug Importer 2017-11-30 05:50:26 PST
<rdar://problem/35771142>