History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-389
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Fabulich
Reporter: Dan Fabulich
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

Safari launcher nukes cookies; should hide/restore them

Created: 27/Nov/07 04:07 PM   Updated: 14/Mar/08 08:53 PM
Component/s: Launcher - Safari
Affects Version/s: None
Fix Version/s: 1.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
SafariCustomProfileLauncher nukes cookies by deleting the Cookies.plist. We should just hide/restore it instead.

 All   Comments   Work Log   Change History      Sort Order:
Dan Fabulich - 04/Dec/07 08:30 PM
Fixed in revision 2101.

Jason Huggins - 12/Mar/08 07:36 PM
The fix doesn't work in Safari/Mac. And, yes, I added -ensureCleanSession to my command line flags...

Looking at the code, I don't see where you actually move/delete the original cookie file. Am I missing something?

From latest trunk version of SafariCustomProfileLauncher.java:
173 if (originalCookieFile.exists()) {
174 backedUpCookieFile = new File(customProfileDir, "Cookies.plist");
175 LauncherUtils.copySingleFile(originalCookieFile, backedUpCookieFile);
176 }

You backup the file, but you don't do anything with the original.

To reproduce (manual setup:)
* Open "www.google.com"
* Click "Sign in"
* Type your email address into Email field
* Type your password into Password field
* Ensure "Remember me on this computer." is checked.
* Click "Sign in"
* Wait to be redirected back to "www.google.com"
* Verify your email address appears on the top of the page
* Close the browser

* Start selenium server with -ensureCleanSession flag

Now with a Selenium client library (Here's a Python example):
>>> from selenium import selenium
>>> u = selenium("localhost",4444,"*safari","http://www.google.com")
>>> u.start()
>>> u.open("/")

# Verify that your email address is *still* at the top of the page... It shouldn't be there.

Jason Huggins - 14/Mar/08 08:53 PM
Fixed in selenium-rc revision 2211. ( http://svn.openqa.org/fisheye/changelog/selenium-rc/?cs=2211 )