How to take screenshot in Appium?

srcFile=element.getScreenshotAs(OutputType.FILE); Description When working in an appium automation project, we often need to take a screenshot on test failure. Appium provides a way to take screenshot with the help of …