Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Internet cookies never get deleted while using selenium webdriver

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
very good idea. will try this! thanks
 
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic