-
Notifications
You must be signed in to change notification settings - Fork 316
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
Save full Firefox profile #917
Conversation
Save the whole Firefox profile directory instead of only saving a few of its subcomponents. Remove an unused import of shutil from profile_commands.py. Additionally, remove the `extension_port.txt` file after reading the port from it, to prevent reading stale port information when a browser is restarted after a crash. Finally, remove a part of the documentation that references the old way of dumping the profile and update a leftover reference to the `log_directory` config option. Closes #62.
Add a test that checks that attempting to save an incomplete profile raises an error. Also, extend `test_saving` to check that a few basic files and directories of the Firefox profile are present in the archived profile.
Codecov Report
@@ Coverage Diff @@
## master #917 +/- ##
==========================================
- Coverage 50.97% 50.91% -0.06%
==========================================
Files 34 34
Lines 3398 3390 -8
==========================================
- Hits 1732 1726 -6
+ Misses 1666 1664 -2
Continue to review full report at Codecov.
|
"webappsstore.sqlite", | ||
"prefs.js", | ||
"bookmarkbackups", | ||
"cache2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this file in my profile but since the tests are passing it must be some quirk in my setup I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I couldn't find this documented anywhere, after experimenting a little and reading the comments in https://stackoverflow.com/questions/25623705/selenium-retaining-firefox-cache-and-history-files, I concluded that when running Firefox with Selenium the browser cache is stored inside the profile, under the cache2
directory, while when running Firefox normally it is stored under ~/.cache/mozilla/firefox/xxxxx/cache2
, where xxxxx
is the same as the profile directory name.
* Save full Firefox profile Save the whole Firefox profile directory instead of only saving a few of its subcomponents. Remove an unused import of shutil from profile_commands.py. Additionally, remove the `extension_port.txt` file after reading the port from it, to prevent reading stale port information when a browser is restarted after a crash. Finally, remove a part of the documentation that references the old way of dumping the profile and update a leftover reference to the `log_directory` config option. Closes openwpm#62. * Test saving full profile Add a test that checks that attempting to save an incomplete profile raises an error. Also, extend `test_saving` to check that a few basic files and directories of the Firefox profile are present in the archived profile.
This PR changes
dump_profile
so that it saves the whole Firefox profile directory instead of only saving a few of its subcomponents. It also adds a test and expands an existing one in order to test this new feature.Closes #62.