This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const Nightmare = require('nightmare'); | |
const url = "http://www.apple.com"; | |
//just an example | |
const path = "./testfile.png"; | |
//we'll save the screenshot in the same directory | |
const userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10A5376e"; | |
//make sure we load the mobile version |