What is the correct way of taking a screenshot when running a webdriver test with Selenium's webdriverjs?
I have the stand-alone selenium server started and I can see the command for taking screenshot is logged on the selenium-server, but the screenshot is not being saved.
My code is the following:
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().usingServer('http://localURL:4444/wd/hub').withCapabilities({'browserName': 'chrome'}).build();
driver.get([URL to webserver on my local machine])
driver.takeScreenshot("c:\\selenium_local_map\\out1.png");