aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/dsl.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenario/dsl.js')
-rw-r--r--src/scenario/dsl.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/scenario/dsl.js b/src/scenario/dsl.js
index 2190f7f7..946f56d3 100644
--- a/src/scenario/dsl.js
+++ b/src/scenario/dsl.js
@@ -323,8 +323,9 @@ angular.scenario.dsl('element', function() {
return this.addFutureAction("element '" + this.label + "' click", function($window, $document, done) {
var elements = $document.elements();
var href = elements.attr('href');
- elements.trigger('click');
- if (href && elements[0].nodeName.toUpperCase() === 'A') {
+ var eventProcessDefault = elements.trigger('click')[0];
+
+ if (href && elements[0].nodeName.toUpperCase() === 'A' && eventProcessDefault) {
this.application.navigateTo(href, function() {
done();
}, done);