From 6a822b204d120e43107065239c6c14cfcb5abee6 Mon Sep 17 00:00:00 2001 From: Ozoniuss Date: Sat, 5 Apr 2025 13:57:41 +0300 Subject: [PATCH] Explain how Firefox uses user profiles This extends the Firefox profile documentation by explaining how Selenium works when supplying an existing profile directory. Since profiles are not cleaned up by Selenium, it also describes how they can be explicitly removed by the user. --- .../documentation/webdriver/browsers/firefox.en.md | 11 ++++++++++- .../documentation/webdriver/browsers/firefox.ja.md | 10 ++++++++++ .../documentation/webdriver/browsers/firefox.pt-br.md | 10 ++++++++++ .../documentation/webdriver/browsers/firefox.zh-cn.md | 10 ++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/website_and_docs/content/documentation/webdriver/browsers/firefox.en.md b/website_and_docs/content/documentation/webdriver/browsers/firefox.en.md index 31d0987a5eb4..8d91e16fb4c3 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/firefox.en.md +++ b/website_and_docs/content/documentation/webdriver/browsers/firefox.en.md @@ -135,7 +135,16 @@ options.profile = FirefoxProfile() driver = FirefoxDriver(options) {{< /tab >}} {{< /tabpane >}} - +**Note**: Whether you create an empty `FirefoxProfile` or point it to the directory of your own profile, Selenium +will create a temporary directory to store either the data of the new profile or a copy of your existing one. Every +time you run your program, a different temporary directory will be created. These directories are not cleaned up +explicitly by Selenium, they should eventually get removed by the operating system. However, if you want to remove +the copy manually (e.g. if your profile is large in size), the path of the copy is exposed by the `FirefoxProfile` +object. Check the language specific implementation to see how to retrieve that location. + +If you want to use an existing Firefox profile, you can pass in the path to that profile. Please refer to the official +[Firefox documentation](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile) +for instructions on how to find the directory of your profile. ## Service diff --git a/website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md b/website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md index 569eeb89e964..78e2b4d33bac 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md +++ b/website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md @@ -141,6 +141,16 @@ driver = RemoteWebDriver(options) {{< /tabpane >}} +**Note**: Whether you create an empty `FirefoxProfile` or point it to the directory of your own profile, Selenium +will create a temporary directory to store either the data of the new profile or a copy of your existing one. Every +time you run your program, a different temporary directory will be created. These directories are not cleaned up +explicitly by Selenium, they should eventually get removed by the operating system. However, if you want to remove +the copy manually (e.g. if your profile is large in size), the path of the copy is exposed by the `FirefoxProfile` +object. Check the language specific implementation to see how to retrieve that location. + +If you want to use an existing Firefox profile, you can pass in the path to that profile. Please refer to the official +[Firefox documentation](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile) +for instructions on how to find the directory of your profile. ## サービス diff --git a/website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md b/website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md index f79da783061d..0bd6c937a292 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md @@ -140,6 +140,16 @@ driver = RemoteWebDriver(options) {{< /tabpane >}} +**Note**: Whether you create an empty `FirefoxProfile` or point it to the directory of your own profile, Selenium +will create a temporary directory to store either the data of the new profile or a copy of your existing one. Every +time you run your program, a different temporary directory will be created. These directories are not cleaned up +explicitly by Selenium, they should eventually get removed by the operating system. However, if you want to remove +the copy manually (e.g. if your profile is large in size), the path of the copy is exposed by the `FirefoxProfile` +object. Check the language specific implementation to see how to retrieve that location. + +If you want to use an existing Firefox profile, you can pass in the path to that profile. Please refer to the official +[Firefox documentation](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile) +for instructions on how to find the directory of your profile. ## Service diff --git a/website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md b/website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md index 8e3728615a14..4f10968e9b1e 100644 --- a/website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md @@ -139,6 +139,16 @@ driver = RemoteWebDriver(options) {{< /tabpane >}} +**Note**: Whether you create an empty `FirefoxProfile` or point it to the directory of your own profile, Selenium +will create a temporary directory to store either the data of the new profile or a copy of your existing one. Every +time you run your program, a different temporary directory will be created. These directories are not cleaned up +explicitly by Selenium, they should eventually get removed by the operating system. However, if you want to remove +the copy manually (e.g. if your profile is large in size), the path of the copy is exposed by the `FirefoxProfile` +object. Check the language specific implementation to see how to retrieve that location. + +If you want to use an existing Firefox profile, you can pass in the path to that profile. Please refer to the official +[Firefox documentation](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile) +for instructions on how to find the directory of your profile. ## Service