user608211
user608211

Reputation: 61

Click on Link in robotium

How can I make Robotium click on a particular link in a page?

Upvotes: 6

Views: 1067

Answers (6)

user11016
user11016

Reputation: 171

You will get solution by using

solo.clickOnText(url);

Upvotes: 3

hari_nars1
hari_nars1

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

user1664899
user1664899

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

maszter
maszter

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

discostu
discostu

Reputation: 291

I recommended you to install TestDroid eclipse plugin, it seems like Selenium IDE but for Robotium, obviously

Upvotes: 2

Henrique Rocha
Henrique Rocha

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

Related Questions