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 6364921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:13:37+00:00 2026-05-25T00:13:37+00:00

We are using selenium 2.4 with a python client, and running the scripts on

  • 0

We are using selenium 2.4 with a python client, and running the scripts on Firefox.
When doing delete_all_visible_cookies we are getting the exception:

ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: malformed URI sequence

We realized it happens when we have a cookie from a third-party (so we can’t change it) that causes the problem. We asked about it here in the past and there is an open bug of Selenium for this problem, but it wasn’t fixed yet.

To overcome this problem in the meanwhile we deleted the problematic cookie separately using delete_cookie before doing delete_all_visible_cookies. However, in Selenium 2 we are getting this error also for delete_cookie.

We thought it may be because of the cookie’s value (something like: WSS_GW=V1z%X%X^^^@C@) so we tried to override it and set it to 0 before deleting the cookie. Then we got the error:

ERROR: Couldn’t delete cookie WSS_GW.

The only explanation I found in the web for this error message is:
deleteAllVisibleCookies fails if a cookie name contains % character
but we have other cookies that contain _ in their name and everything is working fine.

Any idea what can be the problem or how we can overcome it?

  • 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-25T00:13:39+00:00Added an answer on May 25, 2026 at 12:13 am

    ok, we found the 2 problems we have here:

    1. The cookie value is problematic, therefore we got the ‘malformed URI sequence’ error. To solve this problem I set the cookie value to 0 using create_cookie(), before deleting the cookies.

    2. There are 2 cookie with the same name and value, but with different domains: one with ‘domain.com’ and one with ‘a.domain.com’ (and the script opened http://b.domain.com). I guess that somehow Selenium saw both of the cookies, and after deleting one it still saw a cookie with the same name, so we got the ‘Couldn’t delete cookie’ error. To solve that, (after I changes the value of all these cookies) I deleted the cookie with the domain ‘domain.com’ using delete_cookie() without the recurse parameter, so when I call delete_all_visible_cookies() it was just one cookie with this name.

    To summarize, what I did is:

    for domain in ['.domain.com','a.domain.com','b.domain.com']:
            sel.create_cookie("%s=0"%problematic_cookie,"path=/, domain=%s"%domain)
    sel.delete_cookie(problematic_cookie,"path=/, domain=.domain.com") # without recurse
    sel.delete_all_visible_cookies()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using selenium with a python client. When doing selenium.delete_all_visible_cookies I get the
I am trying automate a login process to my web application using Selenium-Python Client
I am using Webdriver implemented through Python to run my selenium test scripts in
I recorded a script using the Selenium IDE extension for Firefox, and I would
I am using selenium for sometime and doing good with it. I would like
I'm using selenium-client to test a site. I want to get all a tags
I'm using Selenium RC with chrome-mode for Firefox to automate test cases for a
I'm using Selenium RC and created all scripts in java (Using Junit test case)
I'm trying to scrape a webpage using Selenium (in Python) that is almost entirely
I'm using selenium-client to run a few tests, but Selenium seems to be using

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.