diff --git a/src/SeleniumLibrary/__init__.py b/src/SeleniumLibrary/__init__.py index 278e91ad6..ae74d2130 100644 --- a/src/SeleniumLibrary/__init__.py +++ b/src/SeleniumLibrary/__init__.py @@ -322,10 +322,10 @@ class SeleniumLibrary(DynamicCore): https://robocon.io/, https://github.com/robotframework/' and 'https://github.com/. - = Browser and Driver options = + = Browser and Driver options and service class = This section talks about how to configure either the browser or - the driver using the options ans service arguments of the `Open + the driver using the options and service arguments of the `Open Browser` keyword. == Configuring the browser using the Selenium Options == @@ -404,6 +404,33 @@ class SeleniumLibrary(DynamicCore): is opened, the test can interact with the embedded web-content of the system under test. + == Configuring the driver using the Service class == + + With the ``service`` argument, one can setup and configure the driver. For example + one can set the driver location and/port or specify the command line arguments. There + are several browser specific attributes related to logging as well. For the various + Service Class attributes refer to + [https://www.selenium.dev/documentation/webdriver/drivers/service/|the Selenium documentation] + . Currently the ``service`` argument only accepts Selenium service in the string format. + + === Service string format === + + The string format allows for defining Selenium service attributes + and their values in the `Open Browser` keyword. The attributes names + are case and space sensitive and must match to the Selenium attributes + names. Attributes are defined in a similar way as in Python: attribute + name, equal sign, and attribute value. Example, `port=1234`. Multiple + attributes must be separated by a semicolon. Example: + `executable_path='/path/to/driver';port=1234`. Don't have duplicate + attributes, like `service_args=['--append-log', '--readable-timestamp']; + service_args=['--log-level=DEBUG']` as the second will override the first. + Instead combine them as in + `service_args=['--append-log', '--readable-timestamp', '--log-level=DEBUG']` + + Arguments allow defining Python data types and arguments are + evaluated by using Python. Strings must be quoted with single + or double quotes, example "value" or 'value' + = Timeouts, waits, and delays = This section discusses different ways how to wait for elements to diff --git a/utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt b/utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt index f344aaf4d..2f285d1cf 100644 --- a/utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt +++ b/utest/test/api/approved_files/PluginDocumentation.test_many_plugins.approved.txt @@ -264,10 +264,10 @@ contains the following items: https://robotframework.org/, https://robocon.io/, https://github.com/robotframework/' and 'https://github.com/. -= Browser and Driver options = += Browser and Driver options and service class = This section talks about how to configure either the browser or -the driver using the options ans service arguments of the `Open +the driver using the options and service arguments of the `Open Browser` keyword. == Configuring the browser using the Selenium Options == @@ -346,6 +346,33 @@ applications which utilize the is opened, the test can interact with the embedded web-content of the system under test. +== Configuring the driver using the Service class == + +With the ``service`` argument, one can setup and configure the driver. For example +one can set the driver location and/port or specify the command line arguments. There +are several browser specific attributes related to logging as well. For the various +Service Class attributes refer to +[https://www.selenium.dev/documentation/webdriver/drivers/service/|the Selenium documentation] +. Currently the ``service`` argument only accepts Selenium service in the string format. + +=== Service string format === + +The string format allows for defining Selenium service attributes +and their values in the `Open Browser` keyword. The attributes names +are case and space sensitive and must match to the Selenium attributes +names. Attributes are defined in a similar way as in Python: attribute +name, equal sign, and attribute value. Example, `port=1234`. Multiple +attributes must be separated by a semicolon. Example: +`executable_path='/path/to/driver';port=1234`. Don't have duplicate +attributes, like `service_args=['--append-log', '--readable-timestamp']; +service_args=['--log-level=DEBUG']` as the second will override the first. +Instead combine them as in +`service_args=['--append-log', '--readable-timestamp', '--log-level=DEBUG']` + +Arguments allow defining Python data types and arguments are +evaluated by using Python. Strings must be quoted with single +or double quotes, example "value" or 'value' + = Timeouts, waits, and delays = This section discusses different ways how to wait for elements to