How to get links property using Selenium



Create class in Eclipse.
public class Links
{
Selenium sel = new DefaultSelenium("localhost",4444,"firefox","http://www.xxxxxxx.com");
public void test() throws Interrupted Exception
{
sel.start();
sel.open("/")
sel.windowmaximize();
String a[]=sel.getAllLinks();
System.out.println("Number of links propertties:"+a.length);
int l=a.length;
for(i=0;i lessthan l;i plus plus)
{
System.out.println("link id"+a[i]);
}
}

No comments:

Post a Comment