gulp-phantomcss
gulp-phantomcss copied to clipboard
Localhost URL isn't finding the selector
If I pass in a remote URL like google.com this works, but if I pass in a local URL like (https://test.dev) it can't ever find the selector. Is there a way I can troubleshoot this? Or is there a different URL I should be using when doing localhost testing?
Gulp task:
gulp.task('test', function (){
gulp.src('./testsuite.js')
.pipe($.phantomcss());
});
testsuite.js :
casper.
start('https://site.dev').
then(function(){
this.viewport(400, 1000);
phantomcss.screenshot('.c-featured-front__text', 'header');
});
casper.run();
If I pass in the absolute path to my user it works. For example, if I enter the following path it works:
/Users/username/Sites/test/index.html
But if I use the domain in my hosts file it fails:
local.dev/index.html
Any help would be appreciated.
Sorry for the delayed response, I notice in your example above you're using https://local-hostname ? Is this URL accessable via https?