Share
Go down
oobe
Posts : 1
Join date : 2010-10-26

How to get subpage using javascript

on Tue Oct 26, 2010 6:24 pm
I've logged into page.. and now I wan't read subpage without opening.. how can I do taht?
this thoesnt work Sad

string url = "http://some.www/index.php?page=messages&session=757051ede593";

String script = "";
script += "try { ";
script += " var xhr = new XMLHttpRequest(); ";
script += " xhr.open('GET', '" + url + "', true); ";
script += " xhr.onreadystatechange = function() ";
script += " { ";
script += " if (xhr.readyState == 4) ";
script += " if (xhr.status == 200) ";
script += " res = res + xhr.responseText.ToString(); ";
script += " }; ";
script += " xhr.send(null); ";
script += " res; ";
script += "} catch (e) { 'error'; } ";


String result = selenium.GetEval(script);
return result;
Back to top
Permissions in this forum:
You cannot reply to topics in this forum