Re: Issue 1227 in selenium: IE driver - Does not set cookie

329 views
Skip to first unread message

sele...@googlecode.com

unread,
Feb 5, 2012, 1:26:17 PM2/5/12
to selenium-develope...@googlegroups.com
Updates:
Status: NeedsClarification

Comment #13 on issue 1227 by dawa...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

We have tests which show that this works in some cases. Please supply a
*full* reproduction test script.

sele...@googlecode.com

unread,
Feb 22, 2012, 12:16:32 PM2/22/12
to selenium-develope...@googlegroups.com

Comment #14 on issue 1227 by je...@daptiv.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

This is still an issue (at least in IE8 on Windows 7 using C#)
Interestingly the problem reproduces for me after firing an event on an
aspx page (clicking a button) if WebDriver is using only a single window.
If I user Javascript to open a second window in the session, do my test
work their but set cookies in the other window the test passes.
I have not had time to investigate any further and appreciate any
suggestions.


sele...@googlecode.com

unread,
Feb 22, 2012, 12:28:43 PM2/22/12
to selenium-develope...@googlegroups.com

Comment #15 on issue 1227 by je...@daptiv.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

This is still an issue (at least in IE8, Selenium 2.18 on Windows 7 using

sele...@googlecode.com

unread,
Mar 9, 2012, 6:03:27 PM3/9/12
to selenium-develope...@googlegroups.com

Comment #16 on issue 1227 by brindieb...@gmail.com: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Running the following never gets "found my cookie!" running
selenium-server-standalone-2.15.0.jar, in IE8 on Win7. Runs fine in
Firefox.

------------
Cookie cookie = new Cookie("foo", "bar");
driver.manage().addCookie(cookie);

Set<Cookie> allCookies = driver.manage().getCookies();
for (Cookie aCookie : allCookies)
{
if (aCookie.getName().equals("foo"))
println("found my cookie!");
}

sele...@googlecode.com

unread,
May 7, 2012, 9:05:42 PM5/7/12
to selenium-develope...@googlegroups.com

Comment #17 on issue 1227 by dgtlm...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

I can confirm the same, also it appears that cookie handling in general
might be faulty

sele...@googlecode.com

unread,
May 7, 2012, 9:17:27 PM5/7/12
to selenium-develope...@googlegroups.com

Comment #18 on issue 1227 by dgtlm...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

OK, if i run my standalone server with "-singleWindow" option, i get all
sorts of cookie wierdness, without this, it works for me, does that help
your problem?

sele...@googlecode.com

unread,
May 8, 2012, 11:54:17 AM5/8/12
to selenium-develope...@googlegroups.com

Comment #19 on issue 1227 by brindieb...@gmail.com: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

We start the standalone server by running simply "java -jar
selenium-server-standalone-2.15.0.jar". No arguments.

sele...@googlecode.com

unread,
May 8, 2012, 2:33:31 PM5/8/12
to selenium-develope...@googlegroups.com

Comment #20 on issue 1227 by je...@daptiv.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Another work around is to just set cookies via javascript until addCookie
is fixed.

Example: driver.ExecuteScript(string.Format("document.cookie='{0}={1};
expires={2}; path={3}; domain={4}'", ... args;);

sele...@googlecode.com

unread,
May 8, 2012, 2:34:31 PM5/8/12
to selenium-develope...@googlegroups.com

Comment #21 on issue 1227 by je...@daptiv.com: IE driver - Does not set
expires={2}; path={3}; domain={4}'", ... args);

sele...@googlecode.com

unread,
Jul 3, 2012, 4:19:14 PM7/3/12
to selenium-develope...@googlegroups.com

Comment #22 on issue 1227 by gempe...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

This worked as recently as 2.23.1, but seems to be broken again in 2.24.1?

stacktrace and small java to try to add cookie:
https://gist.github.com/3042607
saucelabs recording of cookie failure:
https://saucelabs.com/jobs/431ce1dfc2cc4096892fdc68e4d8a5ef

sele...@googlecode.com

unread,
Jan 25, 2013, 8:37:28 AM1/25/13
to selenium-develope...@googlegroups.com

Comment #23 on issue 1227 by aleksand...@gmail.com: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Still present in 2.28.0.
Windows 7, IE 8.0.7601.17514

sele...@googlecode.com

unread,
Apr 12, 2013, 4:58:27 AM4/12/13
to selenium-develope...@googlegroups.com

Comment #24 on issue 1227 by sergey.b...@gmail.com: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

It also does not work on 2.32.0.0, and getCookies(); returns 0 elements,
but cookies exists 100% in IE!

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
May 24, 2013, 9:35:41 AM5/24/13
to selenium-develope...@googlegroups.com

Comment #25 on issue 1227 by glacier....@gmail.com: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

it works on 2.33, with IE 10.0.9200.16580, Windows 8 x64.
the result of the test case is:

Cookie :- [test=1369400969596; path=/]

sele...@googlecode.com

unread,
Aug 5, 2013, 11:27:49 PM8/5/13
to selenium-develope...@googlegroups.com

Comment #26 on issue 1227 by gazi...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Note that cookies with the HttpOnly field set cannot be retrieved through
the IE webdriver interface (since these cookies are hidden from
javascript). This may describe some of the errors encountered.

sele...@googlecode.com

unread,
Aug 21, 2013, 1:24:09 PM8/21/13
to selenium-develope...@googlegroups.com

Comment #27 on issue 1227 by ricardo....@gmail.com: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

setCookie is broken for at least IE 6,7,8,9 in Selenium v 2.33
work fine on FF and Chrome

org.openqa.selenium.WebDriverException: Unable to add cookie to page
(WARNING: The server did not provide any stacktrace information)

sele...@googlecode.com

unread,
Sep 20, 2013, 9:03:51 AM9/20/13
to selenium-develope...@googlegroups.com
Updates:
Cc: a.u.savchuk

Comment #28 on issue 1227 by a.u.savchuk: IE driver - Does not set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Hi!

Is this issue still actual?

If so please provide the following:
1. executable test script
2. public URL or HTML+CSS+JS of page at which the problem is reproduced
3. IE settings: protected mode state, confidentiality settings

It would be good if you provide IE driver TRACE log.

sele...@googlecode.com

unread,
Sep 20, 2013, 12:29:32 PM9/20/13
to selenium-develope...@googlegroups.com

Comment #29 on issue 1227 by ricardo....@gmail.com: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Yes it is. I have not had time to gather the necessary info thus far.
Thank you.

sele...@googlecode.com

unread,
Oct 7, 2013, 11:29:27 AM10/7/13
to selenium-develope...@googlegroups.com

Comment #30 on issue 1227 by t...@asseco.dk: IE driver - Does not set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

[This is slightly off-topic: We wanted to inspect certain cookies, not set
them...]

#c26 is onto something, I think. We were facing the same issue with IE10,
where we wanted to retrieve the JSESSIONID cookie (to see if we're logged
in or not).

For FF and Chrome, no problems. But for IE10 it couldn't be found. In our
case, our web app runs on Tomcat and the issue could be fixed by setting:

<Context useHttpOnly="false">
...
</Context>

in Tomcat's conf/context.xml. Who knows if this might enable cookie-setting
[1]. [2] might also be of interest.

Hope this might help someone.

[1]:
http://www.codinghorror.com/blog/2008/08/protecting-your-cookies-httponly.html
[2]: http://www.hanselman.com/blog/HttpOnlyCookiesOnASPNET11.aspx

sele...@googlecode.com

unread,
Oct 7, 2013, 2:28:47 PM10/7/13
to selenium-develope...@googlegroups.com

Comment #31 on issue 1227 by barancev: IE driver - Does not set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

httpOnly cookies can't be obtained, it is a known restriction.

sele...@googlecode.com

unread,
Nov 26, 2013, 4:48:24 AM11/26/13
to selenium-develope...@googlegroups.com

Comment #32 on issue 1227 by skyo...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

It's still actual:IE8 + Win7X64,by the way ,when it will be fixed? thx.

sele...@googlecode.com

unread,
Nov 27, 2013, 5:03:16 AM11/27/13
to selenium-develope...@googlegroups.com

Comment #33 on issue 1227 by mikael.l...@romram.nu: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

We encountered the same issue and found this page that had a possible
solution:

http://kenhirakawa.com/selenium-unable-to-add-cookie-to-page/

It worked for us. Could be worth looking into.

sele...@googlecode.com

unread,
Nov 27, 2013, 5:07:17 AM11/27/13
to selenium-develope...@googlegroups.com

Comment #34 on issue 1227 by mikael.l...@romram.nu: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Kinda related to this issue as well:

https://code.google.com/p/selenium/issues/detail?id=4307

sele...@googlecode.com

unread,
Jan 29, 2014, 6:27:41 PM1/29/14
to selenium-develope...@googlegroups.com

Comment #35 on issue 1227 by james.h....@gmail.com: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Would love to see an IEDriverServer log file from a version of
IEDriverServer.exe with a version later than 2.37.0.1 where the problem is
still occurring.

sele...@googlecode.com

unread,
Feb 10, 2014, 3:48:51 PM2/10/14
to selenium-develope...@googlegroups.com

Comment #36 on issue 1227 by dave.mam...@gmail.com: IE driver - Does not
set cookie
http://code.google.com/p/selenium/issues/detail?id=1227

I am experiencing the same issue, 2.38.0, on SauceLabs.

Executing: [add cookie: X-ftint-tree=4; expires=Thu, 19 Oct 2045 10:19:17
UTC; path=/; domain=integration.x.org] at URL:
/session/fea29935-61b5-4d85-b178-25b22ab6b556/cookie)
4320:32:36.769 WARN - Exception thrown
44org.openqa.selenium.WebDriverException: Unable to add cookie to page
(WARNING: The server did not provide any stacktrace information)
45Command duration or timeout: 27 milliseconds
46Build info: version: '2.30.0', revision: 'dc1ef9c', time: '2013-02-19
00:15:27'
47System info: os.name: 'Windows Server 2012', os.arch: 'x86',
os.version: '6.2', java.version: '1.6.0_43'
48Session ID: c6eb2fdd-1110-4299-b1cd-e872fe20af0a
49Driver info: org.openqa.selenium.ie.InternetExplorerDriver
50Capabilities [{platform=WINDOWS, elementScrollBehavior=0,
javascriptEnabled=true, enablePersistentHover=true,
ignoreZoomSetting=false, browserName=internet explorer,
enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss,
version=10, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false,
requireWindowFocus=false, allowAsynchronousJavaScript=false,
handlesAlerts=true, initialBrowserUrl=, nativeEvents=true,
takesScreenshot=true}]
51 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
52 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
53 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
54 at java.lang.reflect.Constructor.newInstance(Unknown Source)
55 at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
56 at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
57 at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
58 at
org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions.addCookie(RemoteWebDriver.java:627)
59 at
org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringOptions.addCookie(EventFiringWebDriver.java:502)
60 at
org.openqa.selenium.remote.server.handler.AddCookie.call(AddCookie.java:42)
61 at
org.openqa.selenium.remote.server.handler.AddCookie.call(AddCookie.java:1)
62 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
63 at java.util.concurrent.FutureTask.run(Unknown Source)
64 at
org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:167)
65 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
66 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
67 at java.lang.Thread.run(Unknown Source)
6820:32:36.774 WARN - Exception: Unable to add cookie to page (WARNING: The
server did not provide any stacktrace information)
69Command duration or timeout: 27 milliseconds
70Build info: version: '2.30.0', revision: 'dc1ef9c', time: '2013-02-19
00:15:27'
71System info: os.name: 'Windows Server 2012', os.arch: 'x86',
os.version: '6.2', java.version: '1.6.0_43'
72Session ID: c6eb2fdd-1110-4299-b1cd-e872fe20af0a
73Driver info: org.openqa.selenium.ie.InternetExplorerDriver
74Capabilities [{platform=WINDOWS, elementScrollBehavior=0,
javascriptEnabled=true, enablePersistentHover=true,
ignoreZoomSetting=false, browserName=internet explorer,
enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss,
version=10, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false,
requireWindowFocus=false, allowAsynchronousJavaScript=false,
handlesAlerts=true, initialBrowserUrl=, nativeEvents=true,
takesScreenshot=true}]

sele...@googlecode.com

unread,
Feb 13, 2014, 1:55:15 AM2/13/14
to selenium-develope...@googlegroups.com

Comment #37 on issue 1227 by anand...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Jim, here is the log from IEDriver version 2.39. Selenium server version is
2.39 as well. Test was to read all cookies, delete the JSessionID cookie
and add it back with a new value.

D 2014-02-13 12:19:54:555 server.cc(239) Command: POST
/session/912c7d96-669e-47d6-b10d-66aae627f1ff/cookie
{"cookie":{"name":"JSESSIONID","secure":false,"value":":1755905sm","path":"/","class":"org.openqa.selenium.Cookie","hCode":1737295111}}
T 2014-02-13 12:19:54:555 server.cc(346) Entering Server::LookupSession
T 2014-02-13 12:19:54:555 IESession.cpp(187) Entering
IESession::ExecuteCommand
T 2014-02-13 12:19:54:555 IECommandExecutor.cpp(151) Entering
IECommandExecutor::OnSetCommand
T 2014-02-13 12:19:54:555 command.cc(27) Entering Command::Populate
D 2014-02-13 12:19:54:555 command.cc(33) Raw JSON command:
{ "command" : "addCookie", "locator" :
{ "sessionid" : "912c7d96-669e-47d6-b10d-66aae627f1ff" }, "parameters" :
{"cookie":{"name":"JSESSIONID","secure":false,"value":":1755905sm","path":"/","class":"org.openqa.selenium.Cookie","hCode":1737295111}}
}
T 2014-02-13 12:19:54:555 IECommandExecutor.cpp(162) Entering
IECommandExecutor::OnExecCommand
T 2014-02-13 12:19:54:555 IECommandExecutor.cpp(453) Entering
IECommandExecutor::DispatchCommand
T 2014-02-13 12:19:54:555 IECommandExecutor.cpp(569) Entering
IECommandExecutor::GetCurrentBrowser
T 2014-02-13 12:19:54:556 IECommandExecutor.cpp(575) Entering
IECommandExecutor::GetManagedBrowser
T 2014-02-13 12:19:54:556 IECommandExecutor.cpp(525) Entering
IECommandExecutor::IsAlertActive
T 2014-02-13 12:19:54:556 Browser.cpp(631) Entering
Browser::GetActiveDialogWindowHandle
T 2014-02-13 12:19:54:556 Browser.cpp(175) Entering Browser::GetWindowHandle
D 2014-02-13 12:19:54:556 IECommandExecutor.cpp(539) No alert handle is
found
T 2014-02-13 12:19:54:556 IECommandExecutor.cpp(569) Entering
IECommandExecutor::GetCurrentBrowser
T 2014-02-13 12:19:54:556 IECommandExecutor.cpp(575) Entering
IECommandExecutor::GetManagedBrowser
T 2014-02-13 12:19:54:556 DocumentHost.cpp(235) Entering
DocumentHost::AddCookie
T 2014-02-13 12:19:54:556 Browser.cpp(95) Entering Browser::GetDocument
I 2014-02-13 12:19:54:556 Browser.cpp(99) No child frame focus. Focus is on
top-level frame
T 2014-02-13 12:19:54:556 IESession.cpp(208) Beginning wait for response
length to be not zero
T 2014-02-13 12:19:54:561 Browser.cpp(557) Entering
Browser::GetDocumentFromWindow
T 2014-02-13 12:19:54:564 DocumentHost.cpp(292) Entering
DocumentHost::IsHtmlPage
W 2014-02-13 12:19:54:564 DocumentHost.cpp(296) Unable to get mime type for
document, call to IHTMLDocument2::get_mimeType failed
W 2014-02-13 12:19:54:564 DocumentHost.cpp(248) Unable to add cookie,
document does not appear to be an HTML page
T 2014-02-13 12:19:54:564 response.cc(68) Entering
Response::SetErrorResponse
W 2014-02-13 12:19:54:564 response.cc(69) Error response has status code 16
and message 'Unable to add cookie to page' message
T 2014-02-13 12:19:54:564 IECommandExecutor.cpp(569) Entering
IECommandExecutor::GetCurrentBrowser
T 2014-02-13 12:19:54:564 IECommandExecutor.cpp(575) Entering
IECommandExecutor::GetManagedBrowser
T 2014-02-13 12:19:54:565 response.cc(43) Entering Response::Serialize
T 2014-02-13 12:19:54:566 IESession.cpp(217) Found non-zero response length
T 2014-02-13 12:19:54:566 IECommandExecutor.cpp(185) Entering
IECommandExecutor::OnGetResponse
T 2014-02-13 12:19:54:566 IECommandExecutor.cpp(290) Entering
IECommandExecutor::OnIsSessionValid
D 2014-02-13 12:19:54:566 server.cc(308) Response:
{"sessionId":"912c7d96-669e-47d6-b10d-66aae627f1ff","status":16,"value":{"message":"Unable
to add cookie to page"}}

T 2014-02-13 12:19:54:566 server.cc(359) Entering
Server::SendResponseToClient
T 2014-02-13 12:19:54:566 response.cc(32) Entering Response::Deserialize
T 2014-02-13 12:19:54:566 server.cc(451) Entering
Server::SendHttpInternalError

sele...@googlecode.com

unread,
Feb 14, 2014, 1:13:11 AM2/14/14
to selenium-develope...@googlegroups.com

Comment #38 on issue 1227 by sits...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

Issue 6985 may also be related.

sele...@googlecode.com

unread,
Feb 14, 2014, 7:53:18 AM2/14/14
to selenium-develope...@googlegroups.com

Comment #39 on issue 1227 by anand...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

comment 37 was for IE 8.0. It works fine in IE10

sele...@googlecode.com

unread,
Feb 23, 2014, 3:12:47 AM2/23/14
to selenium-develope...@googlegroups.com

Comment #40 on issue 1227 by sits...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

anandj:
Could you also capture and add here the full HTTP headers for the problem
page e.g. the output of
curl -D - -o /dev/null 'https://sucs.org/~sits/test/selenium/ie9header/'
if you were on Linux etc.

sele...@googlecode.com

unread,
Feb 24, 2014, 3:59:11 AM2/24/14
to selenium-develope...@googlegroups.com

Comment #41 on issue 1227 by anand...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

@sits
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:--
--:--:-- 0HTTP/1.1 200 OK
t-srvr: Mon Feb 24 00:39:08 CST 2014
s-srvr: aixwcs486p.prod.ch4.s.com, prdb3
P3P: CP=CAO PSA OUR
Pragma: No-cache
OM_pathInfoOmniName: CmsContentView
s-cs: 0
Content-Type: text/html;charset=UTF-8
Content-Language: en-US
s-srvr: aixwcs486p.prod.ch4.s.com, prdb3 ;akamai_cache
Cache-Control: private, max-age=900
Expires: Mon, 24 Feb 2014 09:09:56 GMT
Date: Mon, 24 Feb 2014 08:54:56 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Connection: Transfer-Encoding

100 78483 0 78483 0 0 2090k 0 --:--:-- --:--:-- --:--:--
2322k

sele...@googlecode.com

unread,
Mar 2, 2014, 2:05:05 PM3/2/14
to selenium-develope...@googlegroups.com

Comment #42 on issue 1227 by sits...@gmail.com: IE driver - Does not set
cookie
http://code.google.com/p/selenium/issues/detail?id=1227

anandj:
My copy IE8 dislikes the "Pragma: No-cache" header you posted - when the
server sends that header pressing the right mouse button and going to
Properties reports a Type: of Not Available.

sele...@googlecode.com

unread,
Sep 4, 2014, 2:34:49 PM9/4/14
to selenium-develope...@googlegroups.com

Comment #43 on issue 1227 by yannick....@gmail.com: IE driver - Does not
set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

I confirm that with :
- selenium server 2.42.2
- IEdriver 2.42.0
- Windows 7 SP1 64B and IE 9.0.8112

a response header 'Cache-control : no-cache' prevent cookie to be set with
the error above ('Unable to get mime type for document')
However, its work fine with value 'private' or 'public' for example.
Just in case, logs available at
https://code.google.com/p/selenium/issues/detail?id=6985#c9

PS : In properties, document type is well detected.

sele...@googlecode.com

unread,
Oct 31, 2014, 10:04:16 AM10/31/14
to selenium-develope...@googlegroups.com

Comment #44 on issue 1227 by barancev: IE driver - Does not set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

Issue 6985 has been merged into this issue.

sele...@googlecode.com

unread,
Oct 31, 2014, 10:45:45 AM10/31/14
to selenium-develope...@googlegroups.com

sele...@googlecode.com

unread,
Nov 1, 2014, 12:41:10 PM11/1/14
to selenium-develope...@googlegroups.com

Comment #46 on issue 1227 by barancev: IE driver - Does not set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

I'd suggest to create a command line option "/dont-check-mime-type" that
suppresses MIME type checking.

Yes, this can cause (sometimes unrecoverable) errors if a user attempts to
perform an operation on a non-HTML document. But if a user sets this option
she takes responsibility on the consequences.

Preventing possible crashes in edge cases is not a sufficient reason to
totally block ability to perform an operation on a valid document (that
looks suspicious).

sele...@googlecode.com

unread,
Nov 2, 2014, 3:03:24 AM11/2/14
to selenium-develope...@googlegroups.com

Comment #47 on issue 1227 by sits...@gmail.com: IE driver - Does not set
cookie
https://code.google.com/p/selenium/issues/detail?id=1227

barancev:

Can you summarise what you did and what you found in your saucelabs logs?
It's impossible to see them without a saucelabs login and they might be of
use to people in the future...

sele...@googlecode.com

unread,
Nov 2, 2014, 4:00:10 AM11/2/14
to selenium-develope...@googlegroups.com

Comment #48 on issue 1227 by barancev: IE driver - Does not set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

Nothing new :)
"Unable to get mime type for document, call to IHTMLDocument2::get_mimeType
failed"

Just confirmed that the issue still persists and suggested a solution to
suppress MIME type checking. That can cause unrecoverable errors if one
attempts to set a cookie to non-HTML page (e.g. a PDF document opened in
the browser). But allows to set cookies for valid HTML pages even if the
browser can't determine MIME type of the page (because the browser is old
and buggy).

sele...@googlecode.com

unread,
Nov 2, 2014, 11:26:09 PM11/2/14
to selenium-develope...@googlegroups.com

Comment #49 on issue 1227 by anand...@gmail.com: IE driver - Does not set
cookie
https://code.google.com/p/selenium/issues/detail?id=1227

@46 brancev:
Where should this "/dont-check-mime-type" be set? Should it be an option
for IEDriverServer?

sele...@googlecode.com

unread,
Nov 3, 2014, 5:57:13 AM11/3/14
to selenium-develope...@googlegroups.com

Comment #50 on issue 1227 by barancev: IE driver - Does not set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

A command like option of IEDriverServer, or a capability.

sele...@googlecode.com

unread,
Nov 3, 2014, 6:59:50 PM11/3/14
to selenium-develope...@googlegroups.com
Updates:
Status: Fixed

Comment #51 on issue 1227 by james.h....@gmail.com: IE driver - Does not
set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

This issue was closed by revision 511ac59049bc.

sele...@googlecode.com

unread,
Nov 3, 2014, 7:06:36 PM11/3/14
to selenium-develope...@googlegroups.com

Comment #52 on issue 1227 by james.h....@gmail.com: IE driver - Does not
set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

I have introduced capability to disable check of mime type of the document
when setting cookies in IE. I have done so despite the fact that omitting
this check can cause unrecoverable crashes in the driver. Evidence seems to
indicate that the problem manifests itself in legacy (<10) versions of IE,
when a Cache-control header with the value "no-cache" is set.

The new capability is "ie.validateCookieDocumentType", and when set to
false, it skips this check when adding a cookie. The default for this
capability when it's unspecified for a session is true; users setting this
capability to false are considered to be on their own when encountering
issues setting cookies, including, but not limited to, crashes in the
driver executable.

Furthermore, I've also added a type safe option in the .NET
InternetExplorerOptions class to set this capability. Other language
bindings will need updates from their maintainers to provide similar type
safe options.

sele...@googlecode.com

unread,
Nov 12, 2014, 12:47:15 PM11/12/14
to selenium-develope...@googlegroups.com

Comment #53 on issue 1227 by yannick....@gmail.com: IE driver - Does not
set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

@52 james.h...

Thanks for the fix !
How could we test it because I didn't found yet IEDriverServer 2.44.0.1
release ?
(even if I fear I'm unable to test it until
https://code.google.com/p/selenium/issues/detail?id=8160 is fixed)

sele...@googlecode.com

unread,
Nov 12, 2014, 12:55:40 PM11/12/14
to selenium-develope...@googlegroups.com

Comment #54 on issue 1227 by james.h....@gmail.com: IE driver - Does not
set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

From the IEDriverServer.exe CHANGELOG
(http://selenium.googlecode.com/git/cpp/iedriverserver/CHANGELOG)

Version number notation guide:
The version number of the IEDriverServer.exe is in the pattern as
follows:

major.minor.build.revision

The "major" and "minor" fields are synchronized to releases of the
Selenium
project. Changes in the "build" field indicate interim releases made
publicly
available via the project downloads page. Changes in "revision" field
indicate
private releases checked into the prebuilts directory of the source
tree, but
not made generally available on the downloads page.

Given that the version number change is in the fourth field (the "revision"
field), you can easily see that the version is not publicly released. It
is, however, checked into the prebuilt directory of the source tree, and as
such, can be pulled via a git clone, or retrieved via
http://selenium.googlecode.com/git/cpp/prebuilt/Win32/Release/IEDriverServer.exe

sele...@googlecode.com

unread,
Nov 15, 2014, 4:51:27 AM11/15/14
to selenium-develope...@googlegroups.com

Comment #55 on issue 1227 by yannick....@gmail.com: IE driver - Does not
set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

checked into the prebuilt directory of the source tree

Exactly what I was looking for, thanks

sele...@googlecode.com

unread,
Apr 3, 2015, 12:33:05 PM4/3/15
to selenium-develope...@googlegroups.com

Comment #56 on issue 1227 by barancev: IE driver - Does not set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

Issue 8056 has been merged into this issue.

sele...@googlecode.com

unread,
May 13, 2015, 8:36:55 AM5/13/15
to selenium-develope...@googlegroups.com

Comment #57 on issue 1227 by nikolay....@gmail.com: IE driver - Does not
set cookie
https://code.google.com/p/selenium/issues/detail?id=1227

Issue is reproducible on IEServer 2.45. WebDriver doesn't see cookies in IE.
Reply all
Reply to author
Forward
0 new messages