OUTPUT - http://www.nike.com/us/en_us/ - Nike. Just Do It. Nike.com
var casper = require('casper').create();
casper.options.logLevel = 'debug';
casper.options.viewportSize = {
width: 1366,
height: 768
};
casper.options.pageSettings = {
loadImages: true,
loadPlugins: true,
webSecurityEnabled: true,
ignoreSslErrors: false,
localToRemoteUrlAccessEnabled: false
};
casper.start('http://www.nike.com/us/en_us/', function() {
this.echo('http://www.nike.com/us/en_us/' + ' - ' + this.getTitle() + '\n');});
casper.run();
--
CasperJS homepage & documentation: http://casperjs.org/
CasperJS @github: https://github.com/n1k0/casperjs
You received this message because you are subscribed to the Google Groups "casperjs" group.
Visit this group at http://groups.google.com/group/casperjs?hl=en.
---
You received this message because you are subscribed to a topic in the Google Groups "CasperJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/casperjs/UyWXl_rRTEE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to casperjs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to casperjs+u...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to casperjs+unsubscribe@googlegroups.com.
var x = require('casper').selectXPath;
After that you can access the element by the example below or other variations of XPath -
this.click(x('//*[@id="username"]'));
To unsubscribe from this group and all its topics, send an email to casperjs+unsubscribe@googlegroups.com.
x("//*[@id=${username}]"
Yes but I want to use template literal to embed that username in the xpath like:
x("//*[id=${username}]")
Enter code here...
On Friday, June 2, 2017 at 2:12:28 PM UTC-6, Ken wrote:
casper.options.pageSettings = {
webSecurityEnabled: false,
ignoreSslErrors: true,
localToRemoteUrlAccessEnabled: true
};
To unsubscribe from this group and all its topics, send an email to casperjs+unsubscribe@googlegroups.com.