Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when running in Selenium (with fix) #7

Open
brunobg opened this issue Dec 23, 2013 · 1 comment
Open

Problem when running in Selenium (with fix) #7

brunobg opened this issue Dec 23, 2013 · 1 comment

Comments

@brunobg
Copy link

brunobg commented Dec 23, 2013

Disclaimer: This is not a bug in wysihtml5 per se, but it took me some time to track it down and it is in place in the code with some "hack" comments.

Bug: if you open a page with wysihtml5 in Selenium (tested with Firefox and Selenium 2.39.0), it crashes the test with

6:08:42.377 WARN - Exception thrown
java.lang.IllegalArgumentException: Required attributes are not set or any non-null attribute set to null
        at org.openqa.selenium.Cookie.validate(Cookie.java:140)
        at org.openqa.selenium.Cookie.<init>(Cookie.java:86)
        at org.openqa.selenium.Cookie$Builder.build(Cookie.java:225)
        at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions.getCookies(RemoteWebDriver.java:665)
        at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringOptions.getCookies(EventFiringWebDriver.java:519)
        at org.openqa.selenium.remote.server.handler.GetAllCookies.call(GetAllCookies.java:33)
        at org.openqa.selenium.remote.server.handler.GetAllCookies.call(GetAllCookies.java:1)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:170)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
16:08:42.377 WARN - Exception: Required attributes are not set or any non-null attribute set to null

This can be fixed by commenting this line (this._unset):

        // This doesn't work in Safari 5 
        // See http://stackoverflow.com/questions/992461/is-it-possible-to-override-document-cookie-in-webkit
        this._unset(iframeDocument, "cookie", "", true);

It seems to me that this line is not necessary (looking at it and the comments above this code), but someone who understands wysihtml better should take a look.

@brunobg
Copy link
Author

brunobg commented Jan 30, 2014

This seems to have been fixed on Selenium: http://code.google.com/p/selenium/issues/detail?id=5790

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant