diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-29 09:07:42 +0200 |
commit | a78976f0ab7113160343b64a0517ed3c5880eacc (patch) | |
tree | aa2909ae4718f81c83c8cfb68c1f5a23485b3173 /testing/marionette/error.js | |
parent | 733f8f1eb908a84d41b46bec94604460dba87479 (diff) | |
parent | 80a1c2cdd31c909c65a71980c89dea2e474251c1 (diff) | |
download | uxp-a78976f0ab7113160343b64a0517ed3c5880eacc.tar.gz |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into js_dom_performance-resource-timing_1
Diffstat (limited to 'testing/marionette/error.js')
-rw-r--r-- | testing/marionette/error.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/testing/marionette/error.js b/testing/marionette/error.js index 97cc3fb258..c36dace256 100644 --- a/testing/marionette/error.js +++ b/testing/marionette/error.js @@ -260,10 +260,23 @@ class ElementClickInterceptedError extends WebDriverError { if (obscuredEl && coords) { const doc = obscuredEl.ownerDocument; const overlayingEl = doc.elementFromPoint(coords.x, coords.y); - msg = error.pprint`Element ${obscuredEl} is not clickable ` + - `at point (${coords.x},${coords.y}) ` + - error.pprint`because another element ${overlayingEl} ` + - `obscures it`; + + switch (obscuredEl.style.pointerEvents) { + case "none": + msg = error.pprint`Element ${obscuredEl} is not clickable ` + + `at point (${coords.x},${coords.y}) ` + + `because it does not have pointer events enabled, ` + + error.pprint`and element ${overlayingEl} ` + + `would receive the click instead`; + break; + + default: + msg = error.pprint`Element ${obscuredEl} is not clickable ` + + `at point (${coords.x},${coords.y}) ` + + error.pprint`because another element ${overlayingEl} ` + + `obscures it`; + break; + } } super(msg); |