sangmingming / robotium

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

Verification of not existing text using solo.searchtext #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by anandpai...@gmail.com on 9 Mar 2011 at 11:19

GoogleCodeExporter commented 9 years ago
Verification of not existing text using solo.searchtext is not proper.

What steps will reproduce the problem?
My test code.

public void test_search() {
     Common.launchContacts();
     solo.clickOnMenuItem("Create contact");

     //Here i am searching a non existing text
     assertFalse(solo.searchText("Email"));

     //After executing above step not executing the below, but return value is false.
     //It is going tearDown()
     solo.clickOnButton("Done");
}

What is the expected output? What do you see instead?
After searching the non existing item, testcase shouldnot be blocked.

Actual:
After searching the non existing item not able to proceed further.

What version of the product are you using? On what operating system?
Android 2.2 with robotium2.2

This issue exists in previous versions also.

Please provide any additional information below

Original comment by anandpai...@gmail.com on 9 Mar 2011 at 11:28

GoogleCodeExporter commented 9 years ago
This: assertFalse(solo.searchText("Email")); will stop the execution if Email 
is found. Probably Email is there but is invincible. So use searchText(String 
text, boolean onlyVisible). Please see the javadoc.

Original comment by renasr...@gmail.com on 9 Mar 2011 at 11:39

GoogleCodeExporter commented 9 years ago
Hi Renas,

    The proposed solution by you is working properly.

Thanks & regards,
Anand

Original comment by anandpai...@gmail.com on 10 Mar 2011 at 11:30

GoogleCodeExporter commented 9 years ago
Great. 

Original comment by renasr...@gmail.com on 10 Mar 2011 at 11:35