Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6a822b2

Browse files
committedApr 6, 2025··
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.
1 parent a2be111 commit 6a822b2

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed
 

Diff for: ‎website_and_docs/content/documentation/webdriver/browsers/firefox.en.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,16 @@ options.profile = FirefoxProfile()
135135
driver = FirefoxDriver(options)
136136
{{< /tab >}}
137137
{{< /tabpane >}}
138-
138+
**Note**: Whether you create an empty `FirefoxProfile` or point it to the directory of your own profile, Selenium
139+
will create a temporary directory to store either the data of the new profile or a copy of your existing one. Every
140+
time you run your program, a different temporary directory will be created. These directories are not cleaned up
141+
explicitly by Selenium, they should eventually get removed by the operating system. However, if you want to remove
142+
the copy manually (e.g. if your profile is large in size), the path of the copy is exposed by the `FirefoxProfile`
143+
object. Check the language specific implementation to see how to retrieve that location.
144+
145+
If you want to use an existing Firefox profile, you can pass in the path to that profile. Please refer to the official
146+
[Firefox documentation](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile)
147+
for instructions on how to find the directory of your profile.
139148

140149
## Service
141150

Diff for: ‎website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md

+10
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ driver = RemoteWebDriver(options)
141141
{{< /tabpane >}}
142142
</div>
143143

144+
**Note**: Whether you create an empty `FirefoxProfile` or point it to the directory of your own profile, Selenium
145+
will create a temporary directory to store either the data of the new profile or a copy of your existing one. Every
146+
time you run your program, a different temporary directory will be created. These directories are not cleaned up
147+
explicitly by Selenium, they should eventually get removed by the operating system. However, if you want to remove
148+
the copy manually (e.g. if your profile is large in size), the path of the copy is exposed by the `FirefoxProfile`
149+
object. Check the language specific implementation to see how to retrieve that location.
150+
151+
If you want to use an existing Firefox profile, you can pass in the path to that profile. Please refer to the official
152+
[Firefox documentation](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile)
153+
for instructions on how to find the directory of your profile.
144154

145155
## サービス
146156

Diff for: ‎website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md

+10
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,16 @@ driver = RemoteWebDriver(options)
140140
{{< /tabpane >}}
141141
</div>
142142

143+
**Note**: Whether you create an empty `FirefoxProfile` or point it to the directory of your own profile, Selenium
144+
will create a temporary directory to store either the data of the new profile or a copy of your existing one. Every
145+
time you run your program, a different temporary directory will be created. These directories are not cleaned up
146+
explicitly by Selenium, they should eventually get removed by the operating system. However, if you want to remove
147+
the copy manually (e.g. if your profile is large in size), the path of the copy is exposed by the `FirefoxProfile`
148+
object. Check the language specific implementation to see how to retrieve that location.
149+
150+
If you want to use an existing Firefox profile, you can pass in the path to that profile. Please refer to the official
151+
[Firefox documentation](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile)
152+
for instructions on how to find the directory of your profile.
143153

144154
## Service
145155

Diff for: ‎website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md

+10
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ driver = RemoteWebDriver(options)
139139
{{< /tabpane >}}
140140
</div>
141141

142+
**Note**: Whether you create an empty `FirefoxProfile` or point it to the directory of your own profile, Selenium
143+
will create a temporary directory to store either the data of the new profile or a copy of your existing one. Every
144+
time you run your program, a different temporary directory will be created. These directories are not cleaned up
145+
explicitly by Selenium, they should eventually get removed by the operating system. However, if you want to remove
146+
the copy manually (e.g. if your profile is large in size), the path of the copy is exposed by the `FirefoxProfile`
147+
object. Check the language specific implementation to see how to retrieve that location.
148+
149+
If you want to use an existing Firefox profile, you can pass in the path to that profile. Please refer to the official
150+
[Firefox documentation](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile)
151+
for instructions on how to find the directory of your profile.
142152

143153
## Service
144154

0 commit comments

Comments
 (0)
Please sign in to comment.