Reputation: 985
I am writing an automated test in javaScript using a node library called webdriver-synch, which pretty much allows you to write selenium test without callbacks and promises. Utilizes the java Webdriver API. There is no documentation on how to do this.
I am having a difficult time understanding how to take and save a screenshot locally using this library. can anyone suggest a solution?
Upvotes: 0
Views: 1118
Reputation: 779
Use the following method which returns screenshot as a base64 encoded PNG.
driver.getScreenshot()
Source: https://github.com/groupon/webdriver-http-sync
Upvotes: 1