How can I extract an input value by id with CasperJS?
问题 I have a casperjs problem. I can't extract value from an id with javascript. I am opening google, searching a term, and i want to get the value from the searchbox by id. var casper = require('casper').create({ verbose: true, logLevel: "info" }); var mouse = require("mouse").create(casper); var x = require('casper').selectXPath; var webPage = require('webpage'); var page = webPage.create(); casper.userAgent('Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171