• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Internet cookies never get deleted while using selenium webdriver

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



i have used the above methods in my setup method and will call this before my test is run.. but still if i login to my application and close it without logging out . next time i login i directly go to my dashboard page instead of going to the normal login page. how can i correct it?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please define the word "i" in this phrase: "but still if i login to my application"
Does the word "i" refer to you personally as a human performing an action?
Or does the word "i" refer to the test you are running?

If the former, wouldn't the solution be to always make sure you log out?
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Log out i can do in the normal circumstances if the tests completed normally. but in case the test stops in some intermediate page and fails and then closes the browser there is no way i can do a log out. i was looking for a way out there!


Thanks
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am referring to running my scripts. not doing it manually
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wouldn't a try-catch-finally block help? Something like this:



The other option is to do a general query before starting the test and see what that query returns. If it returns the portal home page, then send a logout and clear the cookies, and only then start the test.
 
linda russel
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
very good idea. will try this! thanks
reply
    Bookmark Topic Watch Topic
  • New Topic