Forum Discussion

javiercorrero's avatar
Occasional Visitor
4 years ago

Bitbar, automate Screenshots



I looking for a solution that helps me to take app screenshots automatically, is it possible to do that with Bitbar? Do you know how to do that? Do you know better solutions?. 


Thank you for your help!


Best Regards 

3 Replies

  • Hello javiercorrero ,

    could you specify what test framework do you use? Or if you don't use it at all, then what you would like to achieve? So we can provide better support for you 🙂



    • Balthazar's avatar
      New Contributor

      Sorry to resurrect an old thread, but I have the same question.

      How can I capture screenshots when running automated tests on bit bar and have the screenshots saved in my test results ?  I use the code below to save screenshots in a folder called screenshots in my java project.  This works when I run locally (phone plugged into laptop), but when I run in bit bar there are no screenshots in my test results.



      File srcFiler = driver.getScreenshotAs(OutputType.FILE);
      FileUtils.copyFile(srcFiler, new File("screenshots/" + "getScreenshotAs" + ".png"));



      • Balthazar's avatar
        New Contributor

        I contacted support and they provided a solution.  I am posting it here in case anyone else has the same issue.  In the file I needed to comment out the line below.  If this line is not commented out, all images in the project's "screenshots" folder are deleted.

        #rm -rf screenshots