diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/scenario/dsl.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/scenario/dsl.js b/src/scenario/dsl.js index 9bd0caf7..e9d68f64 100644 --- a/src/scenario/dsl.js +++ b/src/scenario/dsl.js @@ -171,6 +171,7 @@ angular.scenario.dsl('binding', function() { * input(name).enter(value) enters value in input with specified name * input(name).check() checks checkbox * input(name).select(value) selects the radio button with specified name/value + * input(name).val() returns the value of the input. */ angular.scenario.dsl('input', function() { var chain = {}; @@ -201,6 +202,13 @@ angular.scenario.dsl('input', function() { }); }; + chain.val = function() { + return this.addFutureAction("return input val", function($window, $document, done) { + var input = $document.elements(':input[name="$1"]', this.name); + done(null,input.val()); + }); + }; + return function(name) { this.name = name; return chain; |
