Skip to content
This repository was archived by the owner on Jan 9, 2019. It is now read-only.
This repository was archived by the owner on Jan 9, 2019. It is now read-only.

the picture is not right when using Spoon.screenshot  #63

Open

Description

@wangfuwen000

in instrument test project ,take picture using calss spoon-cient.jar to take a screenshot, but the picture is aways is start app picture, not the picture in the process running in app.just like below:

device-2014-11-05-212035

my code:
hotellistpage.addFavourate(hotle);
solo.clickOnText("我的收藏");

    getInstrumentation().waitForIdleSync();
    Spoon.screenshot(getActivity(), "isSavaInFavourate");

    personlcenter.isSavaInFavourate(hotle);
    personlcenter.back();

envirorment:
spoon-client-1.1.1.jar
robotium-solo-4.0.jar

please let me know why ASAP?

thanks very much!

Activity

  1. wangfuwen000 commented on Nov 5, 2014

    @wangfuwen000
    Author

    my script is like below:

  2. wangfuwen000 commented on Nov 5, 2014

    @wangfuwen000
    Author

    package com.elong.android.gui.dhotel;

    import org.junit.BeforeClass;

    import com.dp.android.elong.utils.Base;
    import com.elong.android.gui.pages.HomePage;
    import com.elong.android.gui.pages.HotelListPage;
    import com.elong.android.gui.pages.HotelSearchPage;
    import com.elong.android.gui.pages.PersonalCenter;
    import com.elong.android.gui.test.R;
    import com.squareup.spoon.Spoon;

    ;

    public class HotelFavourateTest4 extends Base {

    private String usrname;
    private String password;
    private String hotle;
    
    @BeforeClass
    protected void setUp() throws Exception {
    
        super.setUp();
        usrname =  getInstrumentation().getContext().getString(R.string.usrname);
        password = getInstrumentation().getContext().getString(R.string.password);
        hotle = getInstrumentation().getContext().getString(R.string.hotle);
    }
    
    
    public void testHotelFavourate(){
    
        solo.sleep(5000);
    
        HomePage homepage = new HomePage(solo);
        homepage.isOnShow();
        homepage.navigateTo("个人中心");
        homepage.login(usrname,password);
        solo.sleep(5000);
    
    
        PersonalCenter personlcenter = new PersonalCenter(solo);
        personlcenter.isOnShow();
    
        homepage.navigateTo("首页");
        homepage.isOnShow();
    
        homepage.navigateTo("附近酒店");
    
    
        HotelListPage hotellistpage = new HotelListPage(solo);
        hotellistpage.isOnShow();
    
        solo.clickOnText("我的收藏");
        personlcenter.deleteFavourate();
        personlcenter.back();
    
    
        hotellistpage.addFavourate(hotle);
    
        solo.clickOnText("我的收藏");
    
        getInstrumentation().waitForIdleSync();
        Spoon.screenshot(getActivity(), "isSavaInFavourate");
    
        personlcenter.isSavaInFavourate(hotle);
        personlcenter.back();
    
        b = true;
    }
    

    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions