javascript - get value of input in casperjs -
Hi all I would like to know how to get an input value with the capacitors
This is my html element
& lt; Input type = "hidden" name = "key" value = "new" and gt; This is what I've tried:
visible = 'user / registered'; casper.test.begin ("activation account", 5, function register (test) {casper.start (webroot + view, function () {}). then (function () {retrieve data from this.echo ("hidden input") ActivationKey = this.evaluate (function () {return __utils __. GetFieldValue ('key';;}}}} then (function () {this.echo ("account with key" ActivateKey + "\" "," COMMENT "); window.location = webroot + activationKey;}); casper.run (function () {this.echo ('account successful activation', 'success' ) Exit (); test.done ();});}); Casper.viewport (page wide, p. Hi); In this case return null I have also tried:
activationKey = __utils__ getFieldValue ('key'); But return this error to me:
FAIL ReferenceError: The variable can not be found: __utils__
Try to use it:
this.getElementAttribute ('input [type = "hidden" ] [Name = "fundamental value");
Comments
Post a Comment