Clicking on javascript anchor with htmlunit does not fetch response -
so,
i collected anchors of page
in list of htmlanchors
.
list<htmlanchor> downloadlinks = (list) loggedin.getbyxpath("//*[@id='ctl00_contentplaceholder1_rgdproduction_ctl00']//a");
and then, went in loop click on each anchor in list , tried fetch respective web responses.
for (int = 1; < downloadlinks.size(); i++) { page p = (page) downloadlinks.get(i).click(); webresponse wr = p.getwebresponse(); system.out.println("page content: " + wr.getcontentasstream()); }
*note: anchors collected of format -> href = "javascript:_some_methodname_()
the problem after clicking on each anchor in list of anchors, fetches same exact web response whereas should have presented 'n' unique responses 'n' anchors similar question has been asked other users, haven't found solution problem.
Comments
Post a Comment