Reputation: 61
How can I make Robotium click on a particular link in a page?
Upvotes: 6
Views: 1067
Reputation: 49
In robotium we have the below function to click on the particular text solo.clickOnText(String str);
example: String str="www.google.com"; solo.clickOnText(str);
Upvotes: 2
Reputation: 327
You can use solo.clickOnText() as you purpose is only to click on the link which will be solved by this.
I have fixed so many issues of mine by solo.clickOnText()
Thanks
Upvotes: 2
Reputation: 3720
You can use clickOnHtmlElement method provided by Testdroid in library, which extends robotium-solo.
http://docs.testdroid.com/_pages/extsolo.html
Upvotes: 1
Reputation: 291
I recommended you to install TestDroid eclipse plugin, it seems like Selenium IDE but for Robotium, obviously
Upvotes: 2
Reputation: 1737
You should try clicking the the anchor text in the link. For example, if the link says www.google.com you can do this:
this.solo.clickOnText("www.google.com");
It is working for me. It should work for you too.
Upvotes: 7