stephenwang1011 / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

Click on Button is not working #239

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I have the Source code for my application
2.I tried to click on Button say Search using the below code
a)Solo.clickonButton("Search");
b)Solo.clickOnView(solo.getView(R.id.search_button));
c)Solo.clickontext("Search");
d)Solo.clickonButton(2); // using the index of the button.

But when i try to get the button name or button from the current activity i am 
able to get the names of button available in that activity.

Button is not getting clicked but the testcase is passing without any error 
message.
Thanks,
Vasanth.
What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Robotium 3.1, Android 2.3(google API)

Please provide any additional information below.

Original issue reported on code.google.com by itsme.va...@gmail.com on 26 Mar 2012 at 9:27

GoogleCodeExporter commented 9 years ago
Please see: Why do text and button clicks get wrong?

http://code.google.com/p/robotium/wiki/QuestionsAndAnswers

Original comment by renasr...@gmail.com on 26 Mar 2012 at 9:09

GoogleCodeExporter commented 9 years ago

Original comment by renasr...@gmail.com on 26 Mar 2012 at 9:10

GoogleCodeExporter commented 9 years ago
Hi, 

my Manifest file is 

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.sample.ui.test"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8" />
          <supports-screens android:anyDensity="true"/>

    <instrumentation android:targetPackage="com.sample.ui" android:name="android.test.InstrumentationTestRunner" />
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">

    <uses-library android:name="android.test.runner" />
    </application>
</manifest> 

But still i am not able to click on button.

I tried with Samsung Nexus/Htc but i am not able to click on Button Search.

My Sample TestMethod:

public void testSampleBusiness(){
    solo.waitForActivity("SplashScreen");
    solo.clickOnEditText(0);
        solo.sleep(5000);
    solo.clickOnView(solo.getView(R.id.search_button));
    }

Kindly help..

Original comment by itsme.va...@gmail.com on 29 Mar 2012 at 5:25