Можно ли обрабатывать всплывающие окна с помощью apache http client?Обработка всплывающих окон в httpclient
Я пытаюсь получить доступ к веб-сайту. Доступ к определенной странице всплывает в новом окне и в ответе на http, все, что я получаю, всплывает новый оконный код в HTML.
Есть ли способ перенаправить на новое всплывающее окно с http-клиента?
Мой код
HttpResponse res = null;
HttpEntity entity = null;
DefaultHttpClient defClient = new DefaultHttpClient();
HttpPost httpost = new HttpPost("http://sudhaezine.com/[email protected]&password=yyy&brw=safari");
res = defClient.execute(httpost);
entity = res.getEntity();
StringBuffer sb = new StringBuffer();
BufferedReader reader = new BufferedReader(new InputStreamReader(entity.getContent()));
String str;
while ((str = reader.readLine()) != null) {
sb.append(new String(str.getBytes(), "UTF-8"));
}
entity.consumeContent();
Это дает следующий ответ
<html><head> <title></title></head><META HTTP-EQUIV=refresh content=30;url=thankyou.php><body background="images/bg1.gif"><script language="javascript">var popupstr=''; //var bor = navigator.appName; //alert(bor); doPopUpWindow = window.open("svww_index1.php","StarView",'width=800,height=600,left=0,top=0'+popupstr); // if (!doPopUpWindow) { //Popup blocked open with in current browser window. // doPopUpWindow = window.open("svww_index1.php","_parent",'width='+ screen.availWidth +',height='+ screen.availHeight +',left=0,top=0'+popupstr); // } try{ var obj = doPopUpWindow.name; // window.close();//WindowOpen.close();//alert("Popup blocker NOT detected"); } catch(e){ doPopUpWindow = window.open("svww_index1.php","_parent",'width='+ screen.availWidth +',height='+ screen.availHeight +',left=0,top=0'+popupstr); }</script></body></html>