How to name captured screenshot?

Hi Team,

Is there a way to give custom name for a captured screenshot, as part of Appium Studio report generation ? (v10.9) As of now, it provides incremental numerics (say, 1, 2, 3, 4 etc) as screenshot name


you mean by using the command getScreenShotAs?

you can modify the file name by running a method in Java

// File (or directory) with old name
File file = new File("oldname");

// File (or directory) with new name
File file2 = new File("newname");

if (file2.exists())
   throw new"file exists");

// Rename file (or directory)
boolean success = file.renameTo(file2);

if (!success) {
   // File was not successfully renamed

Hi Tom,

No, I’m using below capability to generate Appium Studio report with before & after action screenshots

capabilities.setCapability(SeeTestCapabilityType.REPORT_DIRECTORY, System.getProperty(“user.dir”) + “\output\reports\”
+ currentdate + “\”);
capabilities.setCapability(SeeTestCapabilityType.REPORT_FORMAT, “xml”);
capabilities.setCapability(SeeTestCapabilityType.TEST_NAME, testName);

Inside …\test0\images directory - it has stored all the AUTO captured screenshots as follows,

How could i change those default name with our custom name ?

I’m sorry but we don’t support this requirement

If you can share some more information on your user story - e.g - how are you planning to use these images, I might be able to help you out in a different way

Thanks Tom!

We do test our application(s) on localised languages like Japanese/Korean/Russian etc! As part of this we do perform the functional screnarios and do capture screenshot of the outcome, to verify its content by the linguist people. The current test script captures all of our intended product UI perfectly but it saves them as like above mentioned order. It would be really helpful if we get screenshots with custom name based on the test step executed.

Any assistance around this would really help us!