Re: Taking ScreenShots and Store in PC Folder

673 views
Skip to first unread message

naveed

unread,
May 15, 2013, 2:57:32 AM5/15/13
to robotium-...@googlegroups.com
you can run adb pull command after getting screenshot

On Wednesday, May 15, 2013 11:48:20 AM UTC+5, Anbarasan J wrote:
Hi Groups,

Is here there any way to store screenshots in pc folder , i can able to take screenshorts using solo.takescreenshot() method but all are stored in Sdcart only , so please suggest me to store screenshot in pc folder.

Regards
Anbarasu J

Anbarasan Jagadeesan

unread,
May 15, 2013, 3:04:26 AM5/15/13
to robotium-...@googlegroups.com
Hi naveed,

When i run my test cases in Device that screenshots were taken and stored under Robotium-Screenshots But same test cases when i try to run in Emulator that time i dnt get any sceenshots, so my doubt is in emulator how can i see the screenshots which we were taken?

\Regards
Anbarasu J



--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotium-develo...@googlegroups.com.
To post to this group, send email to robotium-...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotium-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Thanks & Regards
Anbarasan J I PHOTON  I Phresco
DLF-SEZ IT Park I Chennai

naveed

unread,
May 15, 2013, 4:12:22 AM5/15/13
to robotium-...@googlegroups.com
In case of emulator are you sure it has SDCard ?  you may need to add sdcard support explicitly on creating emulator specs. 


On Wednesday, May 15, 2013 12:04:26 PM UTC+5, Anbarasan J wrote:
Hi naveed,

When i run my test cases in Device that screenshots were taken and stored under Robotium-Screenshots But same test cases when i try to run in Emulator that time i dnt get any sceenshots, so my doubt is in emulator how can i see the screenshots which we were taken?

\Regards
Anbarasu J

On Wed, May 15, 2013 at 12:27 PM, naveed <lucky...@gmail.com> wrote:
you can run adb pull command after getting screenshot


On Wednesday, May 15, 2013 11:48:20 AM UTC+5, Anbarasan J wrote:
Hi Groups,

Is here there any way to store screenshots in pc folder , i can able to take screenshorts using solo.takescreenshot() method but all are stored in Sdcart only , so please suggest me to store screenshot in pc folder.

Regards
Anbarasu J

--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotium-developers+unsub...@googlegroups.com.

To post to this group, send email to robotium-...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotium-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Stefan Kuhn

unread,
Jul 9, 2013, 8:08:30 AM7/9/13
to robotium-...@googlegroups.com
Hello,

I'm currently stuck with a similar problem. I'm trying to take screenshots while the Calculator example is running on my Android-Phone. But I don't get any screenshots saved to my sdcard. I have added "android.permission.WRITE_EXTERNAL_STORAGE" to the AUT and the JUnit test job, but to no avail.

I have also tried: adb pull /sdcard/Robotium-Screenshots/ C:\Temp
But the tool keeps telling me: remote object '/sdcard/Robotium-Screenshots/' does not exist

I must admit that I'm new to Android and Robotium, so maybe I'm doing something wrong. Here is the code I've changed from the Calculator-Example:

    public void testDisplayBlackBox() {
        //
        solo.takeScreenshot("01_start.png");
        // Enter 10 in first edit-field
        solo.enterText(0, "10");
        // Enter 20 in first edit-field
        solo.enterText(1, "20");
        //
        solo.takeScreenshot("02_before_click.png");
        // Click on Multiply button
        solo.clickOnButton("Multiply");
        // Verify that resultant of 10 x 20
        assertTrue(solo.searchText("200"));
        //
        solo.takeScreenshot("03_result.png");
    }

Renas

unread,
Jul 9, 2013, 9:38:35 AM7/9/13
to robotium-...@googlegroups.com
The issue might be because of a format error. Instead try something like: solo.takeScreenshot("start1");

/Renas



    }

--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotium-develo...@googlegroups.com.

To post to this group, send email to robotium-...@googlegroups.com.

Stefan Kuhn

unread,
Jul 9, 2013, 9:58:55 AM7/9/13
to robotium-...@googlegroups.com
Hi Renas,

thank you, that was exactly the issue! I guess Android 2.2 Froyo did not yet support saving PNG images. I removed the file extensions and it now saves the screenshots as jpegs. :)

Best regards,
Stefan

Reply all
Reply to author
Forward
0 new messages