Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7616921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:00:38+00:00 2026-05-31T03:00:38+00:00

when I run my Selenium test on Win XP Internet Explorer 8 , the

  • 0

when I run my Selenium test on Win XP Internet Explorer 8 , the test doesn’t start fresh. It will start the test using the cookies/cache from a previous run. This does not happen when I run the test in Firefox.
Does anyone have a workaround for this? Preferably in Python
Some of my ideas:

– have a script run in the tearDownClass that deletes all temporary files in: C:\Documents and Settings\Owner\Local Settings\Temporary Internet Files
– instead of “*iehta” as the browser I set it to Internet Explorer private mode “*custom C:\Program Files\Internet Explorer\iexplore.exe -private” (–that didn’t work due to my syntax being off?

Thank you.

import unittest, inspect, time, re,  os
from selenium import selenium

class TESTVerifications(unittest.TestCase):
@classmethod
def setUpClass(self):

    self.selenium = selenium("localhost", 4444, "*iehta", "https://workflowy.com/")
    self.selenium.start() 
    self.selenium.set_timeout("60000")
    print("setUpClass")      
    self.selenium.window_maximize()
    self.selenium.open("/")


def setUp(self):
    self.verificationErrors = []


def test_login_6(self):
    sel = self.selenium
    sel.open("/") 
    sel.type("css=input[id='id_username']",'test+abc010@workflowy.com'  )
    sel.type("css=input[id='id_password']",'password')
    sel.click("css=form[id='login'] > input.submit")
    sel.wait_for_page_to_load("60000")
    self.failUnless(sel.is_element_present("id=logout"))


def tearDown(self):
    #self.selenium.stop()
    self.assertEqual([], self.verificationErrors,"Results: " + str(self.verificationErrors))
@classmethod    
def tearDownClass(self):

    self.selenium.stop()
    print("tearDownClass")

if __name__ == "__main__":
unittest.main()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:00:39+00:00Added an answer on May 31, 2026 at 3:00 am

    You can use sel.delete_all_visible_cookies() which will remove any cookie created by the current domain. If you have multiple domains, you can use the following:

    def clean_history(sel, domains):
        temp = sel.get_location()
        for domain in domains:
            sel.open(domain)
            sel.delete_all_visible_cookies()
        sel.open(temp)
    

    See this blog post for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to run test cases in MS Excel from Selenium? Any books available to
When I run my selenium test (mvn test) from jenkins (windows) I see only
I've written a test case using the Selenium IDE. I would like to run
I am using Webdriver implemented through Python to run my selenium test scripts in
I have some Selenium 2 Webdriver test cases for Firefox and Internet Explorer 9.
I'm writing a selenium grid test suite which is going to be run on
With selenium can one run a test which check all images on a current
I just wanted some opinions from people that have run Selenium ( http://selenium.openqa.org )
How would you run the Selenium process (thread) from a Java process so I
I'm using selenium to run some functional tests on the UI for our current

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.