Re: editText is not working

43 views
Skip to first unread message

naveed

unread,
Feb 6, 2013, 4:13:17 AM2/6/13
to robotium-...@googlegroups.com
You need to replace the current Robotium jar with latest one available. 

Let me know if its still not work. 

On Wednesday, February 6, 2013 1:55:24 PM UTC+5, Vishal Tavande wrote:
I am testing a new apk file whose source code is not available. This apk file is having two EditText fileds and a Button. 

 My code is pasted below.

@SuppressWarnings("unchecked")

public class TestApk extends ActivityInstrumentationTestCase2

{

private static final String TARGET_PACKAGE_ID="com.calculator";

private static final String LAUNCHER_ACTIVITY_FULL_CLASSNAME="com.calculator.Main"

private static Class launcherActivityClass;

static

{

try

launcherActivityClass=Class.forName(LAUNCHER_ACTIVITY_FULL_CLASSNAME); 

} catch (ClassNotFoundException e){ throw new RuntimeException(e); }

}


public TestApk() throws ClassNotFoundException{ super(TARGET_PACKAGE_ID,launcherActivityClass); }

private Solo solo;

@Override

protected void setUp() throws Exception

{

super.setUp();

solo = new Solo(getInstrumentation(), getActivity());

}

public void testDisplayBlackBox() 

{

//Enter any integer/decimal value for first editfield, we are writing 10 

solo.enterText(0, "10");


//Enter any interger/decimal value for first editfield, we are writing 20 

solo.enterText(1, "20");

//Click on Multiply button 

solo.clickOnButton("Multiply");

//Verify that resultant of 10 x 20 

assertTrue(solo.searchText("200"));

solo.getView(R.)

}

@Override

public void tearDown() throws Exception

{

solo.finishOpenedActivities();

super.tearDown();

}

}




when I run this test class I get following error

java.lang.NullPointerException at com.jayway.android.robotium.solo.ViewFetcher.getNonDecorViews


How can I overcome that?

rahul mendiratta

unread,
Feb 7, 2013, 7:34:57 AM2/7/13
to robotium-...@googlegroups.com
This is not working for Android 4.2. When you test in 4.0 or 2.3 its works


On Thu, Feb 7, 2013 at 5:37 PM, A Chakra <acha...@gmail.com> wrote:
I would like to know which version of Robotium you are using.please try to use  Robotium 3.6.jar  let us intimate if you are getting any problem.
--
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.
 
 

Renas

unread,
Feb 7, 2013, 7:38:04 AM2/7/13
to robotium-...@googlegroups.com

Please submit a defect report on this in the issue tracker.

/Renas

rahul mendiratta

unread,
Feb 7, 2013, 7:43:20 AM2/7/13
to robotium-...@googlegroups.com
I report that Log in issue tracker..
Reply all
Reply to author
Forward
0 new messages