summaryrefslogtreecommitdiff
path: root/testing/marionette/error.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-23 11:54:06 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-23 11:54:06 +0200
commitd9d3b687b7c892b400e781dd5c57897efd7173aa (patch)
tree835dacc8cb3df7b05d4b62f4c551d8ad9f791371 /testing/marionette/error.js
parent1ea8529cfb0a246d09daf1ec742d063c08cf1899 (diff)
downloaduxp-d9d3b687b7c892b400e781dd5c57897efd7173aa.tar.gz
moebius#195: DOM - PointerEvent - improvements
https://github.com/MoonchildProductions/moebius/pull/195
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 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);