Dear1ofGdBear
Dear1ofGdBear

Reputation: 985

How do I take a screenshot with selenium and synchronous JS

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

Answers (1)

Khaja Mohammed
Khaja Mohammed

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

Related Questions