Skip to content

Instantly share code, notes, and snippets.

@fpinzn
Created March 27, 2014 03:40
Show Gist options
  • Save fpinzn/9799658 to your computer and use it in GitHub Desktop.
Save fpinzn/9799658 to your computer and use it in GitHub Desktop.
take screenshot using protractor
browser.driver.takeScreenshot().then (data)->
screenShotDirectory = "../"
filename = "ss.png"
stream = fs.createWriteStream(screenShotDirectory + filename)
stream.write new Buffer(data, "base64")
stream.end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment