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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -