summaryrefslogtreecommitdiffstats
path: root/testing/marionette/error.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/marionette/error.js')
-rw-r--r--testing/marionette/error.js21
1 files changed, 17 insertions, 4 deletions
diff --git a/testing/marionette/error.js b/testing/marionette/error.js
index 97cc3fb25..c36dace25 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);