1

I am trying to take screenshot using the getScreenshotAs method using selenium 4 remotely on saucelabs(appium). It is working absolutely fine locally whereas running remotely, I am getting the following error:

Error org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: 404 - "unknown command: session/f1ac120701306ea3a254297a9bb8516a/screenshot/0.07080016425056002-1"

Code

void captureScreenShotOf(WebElement el, WebDriver driver) {
    File newImg = el.getScreenshotAs(OutputType.FILE);
    try {
        FileUtils.copyFile(newImg, new File("./screenshot/expected.jpg"));
    } catch (Exception e) {
        e.printStackTrace();
    }
}

Error Image ErrorImage

user110009
  • 25
  • 5
  • 1
    Hmm looks like it is trying to use the pre-w3c endpoint for some reason: https://github.com/appium/appium/blob/2.0/packages/base-driver/lib/protocol/routes.js#L673-L679 Honestly, I'd just raise this as a bug: https://github.com/appium/appium/issues You can `@` me here or on the ticket if you don't get a response. – titusfortner Apr 14 '22 at 13:40
  • sure, will raise one and keep you posted on the same. @titusfortner – user110009 Apr 19 '22 at 10:29

0 Answers0