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.
Created attachment 327964 [details] Patch
Committed r225326: <https://trac.webkit.org/changeset/225326>
<rdar://problem/35771142>