javascript - Random failure with casperjs fill & select box -


Once in ten, my country's select box does not update my price, it returns the default value Is the country.

I do not know why.

  casper.then (function () {this.fill ('.my-form-class', {address: '17 rue dulong' city: 'Paris' country:' France '} , truth);});  

I would recommend using xpath before you do this for your Casper script Need to inject the xpath headings at the top.

casper.sendKeys (x ('yourXPath', 'keys to send'));

If this is not a good solution then you can always inject jQuery into your script and just use jQuery to change the value of your element.


Comments