Hi , I need help in checking all links in table in cyclic manner, but the response after going ahead to the next link is of the previous link. in spite of I created new response like the following:
WebResponse resp = homePagePersonLinkWaf();\\get the table page WebTable testedTable = getTable(resp); WebResponse EntityResp = null;
....... .... .. . WebLink[] entityLinks = Utils.getTableDataLinks( testedTable ); for(int i = startIndex; i < (entityLinks.length) ; i++) { WebLink MyLink = entityLinks[ i ] ; System.out.print("\nlink is: \n"+ MyLink.getText()+"\n"); EntityResp = MyLink.click(); validateEntity(EntityResp, MyLink.getText() );
//in the following 3 lines, I trying to get the table from the beginning for making sure that the link & response are new .
WebResponse EntityResp = null; testedTable = getTable(resp); entityLinks = Utils.getTableDataLinks( testedTable ); }
how can I get in the response of the second link after clicking on the second, instead of getting again the response of the first link?
Log in to post a comment.
Hi ,
I need help in checking all links in table in cyclic manner,
but the response after going ahead to the next link is of the previous link.
in spite of I created new response like the following:
WebResponse resp = homePagePersonLinkWaf();\\get the table page
WebTable testedTable = getTable(resp);
WebResponse EntityResp = null;
.......
....
..
.
WebLink[] entityLinks = Utils.getTableDataLinks( testedTable );
for(int i = startIndex; i < (entityLinks.length) ; i++)
{
WebLink MyLink = entityLinks[ i ] ;
System.out.print("\nlink is: \n"+ MyLink.getText()+"\n");
EntityResp = MyLink.click();
validateEntity(EntityResp, MyLink.getText() );
//in the following 3 lines, I trying to get the table from the beginning for making sure that the link & response are new .
WebResponse EntityResp = null;
testedTable = getTable(resp);
entityLinks = Utils.getTableDataLinks( testedTable );
}
how can I get in the response of the second link after clicking on the second, instead of getting again the response of the first link?