Yes, i used this code
package com.android.comera

import com.jayway.android.robotium.solo.Solo;

import android.test.ActivityInstrumentationTestCase2;

@SuppressWarnings("unchecked")
public class Mytest extends ActivityInstrumentationTestCase2 {

        private static final String TARGET_PACKAGE_ID =
"com.android.comera";
        private static final String LAUNCHER_ACTIVITY_FULL_CLASSNAME =
"com.android.camera.DashboardListActivity";

        private static Class<?> launcherActivityClass;
        static{
                try {
                        launcherActivityClass =
Class.forName(LAUNCHER_ACTIVITY_FULL_CLASSNAME);
                } catch (ClassNotFoundException e) {
                        throw new RuntimeException(e);
                }
        }

        @SuppressWarnings("unchecked")
        public Mytest() throws ClassNotFoundException {
                super(TARGET_PACKAGE_ID, launcherActivityClass);
        }

        private Solo solo;

        @Override
        protected void setUp() throws Exception {
                solo = new Solo(getInstrumentation(), getActivity());
        }

        public void testCanOpenSettings(){
               solo.sendKey(solo.ENTER)
                solo.pressMenuItem(0);

               solo.clickonscreen(743,411)
///For opening the image viewer in camera once the image i entered into the
image viewer
I am "Views are showing 0" and also unable to perfom event
solo.clickonscreen(743,411) (click is not complete error is comming.

        }


 @Override
   public void tearDown() throws Exception {
                solo.finishOpenedActivities();

  }


}

Not finding the views in camera image viewer ArrayLiet <view> view
solo.getViews();
i am not getting any views and any button information. If i used
 solo.clickonscreen(x,Y) Getting Error Like " click is incomplete.

Application Source code is not available so i cannot use the resource id .
so what is solution for this . Is there any other solution?


Thanks
Arjun

On Wed, Sep 12, 2012 at 2:54 AM, Lew <[email protected]> wrote:

> Yes, but you still have to write source code to do so.
>
>
> On Tuesday, September 11, 2012 11:52:04 AM UTC-7, Arjun wrote:
>
>> In robotium its possible to test the Preinstalled application
>> http://code.google.com/p/**robotium/wiki/**RobotiumForPreInstalledApps<http://code.google.com/p/robotium/wiki/RobotiumForPreInstalledApps>
>>
>>
>> On Tue, Sep 11, 2012 at 11:41 PM, Lew <[email protected]> wrote:
>>
>>> How do you write a test without source code?
>>>
>>> Arjun wrote:
>>>>
>>>> Thanks for your reply actually i [sic] am testing testing the APK
>>>> without source code.
>>>>
>>>> Lew wrote:
>>>>
>>>> Arjun wrote:
>>>>>>
>>>>>> can you pla tel me the example how to use it in case if get
>>>>>> ArrayList<view> view= solo.getviews(); is comming  0 i mean
>>>>>> in this case what is the solution can u give me a example
>>>>>>
>>>>>> You should introduce new questions as new topics, but here goes. From
>>>>> a code fragment it's
>>>>> impossible to be certain. I've seen timing issues, where Views aren't
>>>>> rendered yet at the time
>>>>> 'solo' is looking. If you can peg a specific view, say by resource ID
>>>>> ('R.id.foobar'), you can
>>>>> wait for a view with something like
>>>>>
>>>>>  boolean gotView = solo.waitForView(solo.getView(****R.id.foobar));
>>>>>
>>>>> 'getViews()' returns "an ArrayList of all the View objects located in
>>>>> the focused Activity or Dialog."
>>>>>
>>>>> Perhaps your focused 'Activity' or 'Dialog' didn't have any 'View's.
>>>>>
>>>>> Show us a complete example that illustrates your issue.
>>>>>
>>>>> http://sscce.org/
>>>>>
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@**googlegroups.com
>>>
>>> To unsubscribe from this group, send email to
>>> android-developers+**[email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>>
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to