I want a selenium RC java test script that prints all the links in a page which contains show/id
.
I tried this
int servicecount= selenium.getXpathCount("xpath=//a[contains(@href,'show/id')]").intValue();
for(int servicecnt=1;servicecnt<=servicecount;servicecnt++)
{
String some_container=selenium.getText("xpath= //a[contains(@href,'show/id')["+servicecnt+"]");
System.out.println(some_container);
}
This doesn't work. Please suggest solutions.