File scrFile = (File)(driver.findElement(By.tagName("body"))).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("/Users/test/Desktop/santosh.png"));
org.openqa.selenium.UnsupportedCommandException: Unrecognized command: GET /session/08965f64-0664-7f4c-9706-7c6058d05215/screenshot/%7B0988bcf4-35aa-df4c-aa49-773d41e5a737%7D
Command duration or timeout: 5 milliseconds
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'test', ip: '127.0.0.1', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.7.0_60'
Session ID: 08965f64-0664-7f4c-9706-7c6058d05215
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, nativeEvents=false, webStorageEnabled=true, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=28.0}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:273)
at org.openqa.selenium.remote.RemoteWebElement.getScreenshotAs(RemoteWebElement.java:371)
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6d5523e0-d14b-47e0-bb0e-739b77327d28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks David & Mohammed Abdul !
File scrFile = (File)(driver.findElement(By.tagName("body"))).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("/Users/test/Desktop/santosh.png"));