@@ -117,7 +117,12 @@ def open_browser(self, url, browser='firefox', alias=None,
117117 uses. Notice that prior to SeleniumLibrary 3.0, the library
118118 contained its own profile that was used by default. The
119119 ``ff_profile_dir`` can also be instance of the
120- [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.firefox_profile.html?highlight=firefoxprofile#selenium.webdriver.firefox.firefox_profile.FirefoxProfile|selenium.webdriver.FirefoxProfile].
120+ [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_firefox/selenium.webdriver.firefox.firefox_profile.html|selenium.webdriver.FirefoxProfile]
121+ . As third option, it possible to use `FirefoxProfile` methods
122+ and attributes to define the profile. Using method and attributes
123+ in same way as with ``options`` argument. Example it is possible
124+ to use FirefoxProfile `set_preference` to define different
125+ profile settings.
121126
122127 Optional ``options`` argument allows to define browser specific
123128 Selenium options. Example for Chrome, the ``options`` argument
@@ -210,9 +215,14 @@ def open_browser(self, url, browser='firefox', alias=None,
210215 Example when using
211216 [https://seleniumhq.github.io/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.options.html#selenium.webdriver.chrome.options.Options|Chrome options]
212217 method:
213- | `Open Browser` | http://example.com | Chrome | options=add_argument("--disable-popup-blocking"); add_argument("--ignore-certificate-errors") | # Sting format |
214- | ${options} = | Get Options | | | # Selenium options instance |
215- | `Open Browser` | http://example.com | Chrome | options=${options} | |
218+ | `Open Browser` | http://example.com | Chrome | options=add_argument("--disable-popup-blocking"); add_argument("--ignore-certificate-errors") | # Sting format |
219+ | ${options} = | Get Options | | | # Selenium options instance |
220+ | `Open Browser` | http://example.com | Chrome | options=${options} | |
221+
222+ Example for FirefoxProfile
223+ | `Open Browser` | http://example.com | Firefox | ff_profile_dir=/path/to/profile | # Using profile from disk |
224+ | `Open Browser` | http://example.com | Firefox | ff_profile_dir=${FirefoxProfile_instance} | # Using instance of FirefoxProfile |
225+ | `Open Browser` | http://example.com | Firefox | ff_profile_dir=set_preference("key", "value");set_preference("other", "setting") | # Defining profile using FirefoxProfile mehtods |
216226
217227 If the provided configuration options are not enough, it is possible
218228 to use `Create Webdriver` to customize browser initialization even
@@ -225,7 +235,8 @@ def open_browser(self, url, browser='firefox', alias=None,
225235 in SeleniumLibrary 4.0. The ``options`` and ``service_log_path``
226236 are new in SeleniumLibrary 4.0. Support for ``ff_profile_dir``
227237 accepting instance of the `selenium.webdriver.FirefoxProfile`
228- is new in SeleniumLibrary 4.0.
238+ and support defining FirefoxProfile with methods and
239+ attributes are new in SeleniumLibrary 4.0.
229240 """
230241 index = self .drivers .get_index (alias )
231242 if index :
0 commit comments