Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to tests click on a button... #508

Closed
renas opened this issue Aug 19, 2015 · 3 comments
Closed

Unable to tests click on a button... #508

renas opened this issue Aug 19, 2015 · 3 comments

Comments

@renas
Copy link
Contributor

renas commented Aug 19, 2015

From rsimoni....@gmail.com on April 05, 2013 02:30:50

What steps will reproduce the problem? 1. create an activity with a button "Play"
2. create a test that does solo.clickOnButton("Play") 3. What is the expected output? What do you see instead? I think I have done all correct, but I see an error saying that the button does not exists.
I have followed instructions on FAQ for these type of problems, but the error remains. What version of the product are you using? On what operating system? I am using robotium-4.0, android version 4.1.1.4 and sdk platform 7 (android 2.1) Please provide any additional information below. I have added a test PlayerScreenTest that uses standard Android utilities and it runs. The test PlayerScreenRobotiumTest uses Robotium and fails. I have commented and uncommented the launcher. I don't undestand what I'm doing wrong...

Attachment: androidample.zip

Original issue: http://code.google.com/p/robotium/issues/detail?id=429

@renas
Copy link
Contributor Author

renas commented Aug 19, 2015

From rsimoni....@gmail.com on April 05, 2013 02:47:20

Sorry, but when I have updated the test and switched to robotium-3.4.1 the test has started to run. Retrying to use robotium-4.0 the test continues to run.
So discard this issue. I do not understand what I was doing wrong a part that the test now is:

public class PlayerScreenRobotiumTest extends ActivityInstrumentationTestCase2 {

private Solo solo;

public PlayerScreenRobotiumTest() {
    super("androidample.mobile", PlayerScreen.class);
}

public void testThatPressingPlayButtonShouldChangeItsTextToStop_withRobotium() {
    solo.clickOnButton("Play");

    Button actionButton = (Button) solo.getCurrentActivity().findViewById(R.id.action);
    assertEquals("Stop", actionButton.getText());
}

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

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

}

I'm so sorry to have opened this issue...

@renas
Copy link
Contributor Author

renas commented Aug 19, 2015

From renasr...@gmail.com on April 05, 2013 03:09:35

Status: Invalid

@renas
Copy link
Contributor Author

renas commented Aug 19, 2015

From renasr...@gmail.com on April 05, 2013 03:56:47

Owner: renasr...@gmail.com

@renas renas closed this as completed Aug 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant