How to get screenshot from RemoteWebDriver server instead of local FirefoxDriver?

0
0

I am running Selenium WebDriver test on a remote PC from my laptop(java client), by using RemoteWebDriver. But RemoteWebDriver haven’t provided screenshot API to directly get a screenshot of remote PC. Googled a lot but found seems need use to Json API to get it from remoteWebDriver server directly. Anyone can give me some instruction about how to do that? Thanks.

  • You must to post comments
0
0

The RemoteWebDriver must be augmented before you can use the screenshot capability. As you have no doubt already found, attempting to cast without augmenting results in an exception.

WebDriver driver = new RemoteWebDriver( ... );
driver
= new Augmenter().augment( driver );
( (TakesScreenshot)driver ).getScreenshotAs( ... );


  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website