c# - Session Expired in selenium IE webdriver -


i have secured site need scrape data particular pages. page should opened strictly on ie. opened login page selenium , pass handle webdriver. user surfs various pages , pop ups of website. timer runs , checked whether particular page opened or not. being checked following code.

  var windowiterator = driver.windowhandles;   foreach (var windowhandle in windowiterator)   {      popup = driver.switchto().window(windowhandle);      if (popup.title == pagetitle) //pagetitle string value , saved in app config      {         dowork = true; //scraping started on page         break;      }   } 

it working other sites in testing environment. in live environment pop page displaying session expired message , asking user credentials. once given working fine. architecture of website being scraped unknown me.

could body tell me why happening , way out.

possibly takes of time scrap data before page updated/changed.

i believe site give browser one-session-cookes. check of cookies site gaves you. possibly can resolved cookies edit via selenium. if not -- can refresh page in smaller life time of cookies , show server "user here" =)


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -