开发者

Click on Link in robotium

开发者 https://www.devze.com 2023-02-20 00:03 出处:网络
H开发者_如何学Goow can I make Robotium click on a particular link in a page?You should try clicking the the anchor text in the link.

H开发者_如何学Goow can I make Robotium click on a particular link in a page?


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.


You will get solution by using

solo.clickOnText(url);


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


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


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);


You can use clickOnHtmlElement method provided by Testdroid in library, which extends robotium-solo.

http://docs.testdroid.com/_pages/extsolo.html

0

精彩评论

暂无评论...
验证码 换一张
取 消