From ee5a7dee4cde1a0070369f8ca5d86406bdc8fb7e Mon Sep 17 00:00:00 2001 From: Ed Manlove Date: Sun, 9 Jun 2024 14:10:56 -0400 Subject: [PATCH 1/6] Reduced tested against selenium versions to latest two --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 433402752..8db0eff25 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ jobs: matrix: python-version: [3.8, 3.11] # 3.12, pypy-3.9 rf-version: [5.0.1, 6.1.1, 7.0] - selenium-version: [4.16.0, 4.17.2, 4.18.1, 4.19.0, 4.20.0, 4.21.0] + selenium-version: [4.20.0, 4.21.0] browser: [firefox, chrome, headlesschrome] #edge steps: From 489f103ed665029dab0ab8b681afe5de3f667a75 Mon Sep 17 00:00:00 2001 From: Ed Manlove Date: Sun, 9 Jun 2024 14:11:52 -0400 Subject: [PATCH 2/6] Reworded some documentation on selib tool I reworded some of the documentation from the perspective of one who had not yet used the tool. Also made some minor changes to spelling. --- src/SeleniumLibrary/__init__.py | 21 ++++++++-------- src/SeleniumLibrary/entry/__main__.py | 32 ++++++++++++------------ src/SeleniumLibrary/entry/translation.py | 28 ++++++++++----------- utest/test/entry/test_entry_point.py | 14 +++++------ 4 files changed, 48 insertions(+), 47 deletions(-) diff --git a/src/SeleniumLibrary/__init__.py b/src/SeleniumLibrary/__init__.py index 5209cf8aa..e0e6ef459 100644 --- a/src/SeleniumLibrary/__init__.py +++ b/src/SeleniumLibrary/__init__.py @@ -550,16 +550,16 @@ class SeleniumLibrary(DynamicCore): = Language = - SeleniumLibrary offers possibility to translte keyword names and documentation to new language. If language + SeleniumLibrary offers the possibility to translate keyword names and documentation to new language. If language is defined, SeleniumLibrary will search from [https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#module-search-path | module search path] - Python packages starting with `robotframework_seleniumlibrary_translation` by using - [https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/ | Python pluging API]. Library + for Python packages starting with `robotframework-seleniumlibrary-translation` by using the + [https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/ | Python pluging API]. The Library is using naming convention to find Python plugins. - The package must implement single API call, ``get_language`` without any arguments. Method must return a + The package must implement a single API call, ``get_language`` without any arguments. The method must return a dictionary containing two keys: ``language`` and ``path``. The language key value defines which language - the package contains. Also value should match (case insentive) the library ``language`` import parameter. + the package contains. Also the value should match (case insensitive) the library ``language`` import parameter. The path parameter value should be full path to the translation file. == Translation file == @@ -568,8 +568,8 @@ class SeleniumLibrary(DynamicCore): format. The keys of json are the methods names, not the keyword names, which implements keywords. Value of key is json object which contains two keys: ``name`` and ``doc``. The ``name`` key contains the keyword translated name and `doc` contains translated documentation. Providing doc and name are optional, example - translation json file can only provide translations to keyword names or only to documentatin. But it is - always recomended to provide translation to both name and doc. Special key ``__intro__`` is for class level + translation json file can only provide translations to keyword names or only to documentation. But it is + always recommended to provide translation to both name and doc. Special key ``__intro__`` is for class level documentation and ``__init__`` is for init level documentation. These special values ``name`` can not be translated, instead ``name`` should be kept the same. @@ -580,9 +580,10 @@ class SeleniumLibrary(DynamicCore): languages, it only provides easy way to create full list keywords and their documentation in correct format. It is also possible to add keywords from library plugins by providing `--plugings` arguments to command. Example: `rfselib translation --plugings myplugin.SomePlugin /path/to/translation.json` The - genered json file contains `sha256` key, which constains the sha256 sum of the library documentation, - the sha256 sum is used by `rfselib translation --compare /path/to/translation.json` command, which compares - transation to to library and prints outs a table which tell if there are changes needed for translation file. + generated json file contains `sha256` key, which contains the sha256 sum of the library documentation. + The sha256 sum is used by `rfselib translation --compare /path/to/translation.json` command, which compares + the translation to the library and prints outs a table which tells if there are changes needed for + translation file. Example project for translation can be found from [https://github.com/MarketSquare/robotframework-seleniumlibrary-translation-fi | robotframework-seleniumlibrary-translation-fi] diff --git a/src/SeleniumLibrary/entry/__main__.py b/src/SeleniumLibrary/entry/__main__.py index eed3150b5..21a6896e6 100644 --- a/src/SeleniumLibrary/entry/__main__.py +++ b/src/SeleniumLibrary/entry/__main__.py @@ -13,13 +13,14 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from pathlib import Path from typing import Optional import click from .get_versions import get_version -from .translation import compare_translatoin, get_library_translaton +from .translation import compare_translation, get_library_translation CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"]} @@ -32,10 +33,9 @@ def cli(): """Robot Framework SeleniumLibrary command line tool. Possible commands are: - translation - - translation will generate detaul tranlsation json file from library keywords. + translation + will generate template translation json file from library keywords. See each command argument help for more details what (optional) arguments that command supports. """ @@ -49,7 +49,7 @@ def cli(): required=True, ) @click.option( - "--plugings", + "--plugin", help="Same as plugins argument in the library import.", default=None, type=str, @@ -63,31 +63,31 @@ def cli(): ) def translation( filename: Path, - plugings: Optional[str] = None, + plugins: Optional[str] = None, compare: bool = False, ): """Default translation file from library keywords. This will help users to create their own translation as Python plugins. Command - will populate json file with english language. To create proper translation + will populate json file with English language. To create proper translation file, users needs to translate the keyword name and doc arguments values in json file. The filename argument will tell where the default json file is saved. - The --pluging argument is same as plugins argument in the library import. - If you use plugins, it is also get default translation json file also witht - the plugin keyword included in the library. + The --plugin argument will add plugin keywords in addition to the library keywords + into the default translation json file. It is used the same as plugins argument in + the library import. If the --compare flag is set, then command does not generate template - translation file. Then it compares sha256 sums from the filenane - to ones read from the library documenentation. It will print out a list - of keywords which documentation sha256 does not match. This will ease - translation projects to identify keywords which documentation needs updating. + translation file. Instead it compares sha256 sums from the filename + to the one read from the library documentation. It will print out a list + of keywords for which the documentation sha256 does not match. This will ease + translating projects to identify keywords which needs updating. """ - translation = get_library_translaton(plugings) + lib_translation = get_library_translation(plugins) if compare: - if table := compare_translatoin(filename, translation): + if table := compare_translation(filename, lib_translation): print( "Found differences between translation and library, see below for details." ) diff --git a/src/SeleniumLibrary/entry/translation.py b/src/SeleniumLibrary/entry/translation.py index 807ef3e35..3c98dddaa 100644 --- a/src/SeleniumLibrary/entry/translation.py +++ b/src/SeleniumLibrary/entry/translation.py @@ -24,7 +24,7 @@ DOC_CHANGED = "Documentation update needed" NO_LIB_KEYWORD = "Keyword not found from library" MISSING_TRANSLATION = "Keyword is missing translation" -MISSING_CHECKSUM = "Keyword tranlsaton is missing checksum" +MISSING_CHECKSUM = "Keyword translation is missing checksum" MAX_REASON_LEN = max( len(DOC_CHANGED), len(NO_LIB_KEYWORD), @@ -33,10 +33,10 @@ ) -def get_library_translaton(plugings: Optional[str] = None) -> dict: +def get_library_translation(plugins: Optional[str] = None) -> dict: from SeleniumLibrary import SeleniumLibrary - selib = SeleniumLibrary(plugins=plugings) + selib = SeleniumLibrary(plugins=plugins) translation = {} for function in selib.attributes.values(): translation[function.__name__] = { @@ -57,18 +57,18 @@ def get_library_translaton(plugings: Optional[str] = None) -> dict: return translation -def _max_kw_name_lenght(project_tanslation: dict) -> int: +def _max_kw_name_length(project_translation: dict) -> int: max_lenght = 0 - for keyword_data in project_tanslation.values(): + for keyword_data in project_translation.values(): if (current_kw_length := len(keyword_data["name"])) > max_lenght: max_lenght = current_kw_length return max_lenght -def _get_heading(max_kw_lenght: int) -> List[str]: +def _get_heading(max_kw_length: int) -> List[str]: heading = f"| {KEYWORD_NAME} " next_line = f"| {'-' * len(KEYWORD_NAME)}" - if (padding := max_kw_lenght - len(KEYWORD_NAME)) > 0: + if (padding := max_kw_length - len(KEYWORD_NAME)) > 0: heading = f"{heading}{' ' * padding}" next_line = f"{next_line}{'-' * padding}" reason = "Reason" @@ -89,34 +89,34 @@ def _table_doc_updated(lib_kw: str, max_name_lenght: int, reason: str) -> str: return f"{line}|" -def compare_translatoin(filename: Path, library_translation: dict): +def compare_translation(filename: Path, library_translation: dict): with filename.open("r") as file: project_translation = json.load(file) - max_kw_lenght = _max_kw_name_lenght(library_translation) + max_kw_length = _max_kw_name_length(library_translation) table_body = [] for lib_kw, lib_kw_data in library_translation.items(): project_kw_data = project_translation.get(lib_kw) if not project_kw_data: table_body.append( - _table_doc_updated(lib_kw, max_kw_lenght, MISSING_TRANSLATION) + _table_doc_updated(lib_kw, max_kw_length, MISSING_TRANSLATION) ) continue sha256_value = project_kw_data.get("sha256") if not sha256_value: table_body.append( - _table_doc_updated(lib_kw, max_kw_lenght, MISSING_CHECKSUM) + _table_doc_updated(lib_kw, max_kw_length, MISSING_CHECKSUM) ) continue if project_kw_data["sha256"] != lib_kw_data["sha256"]: - table_body.append(_table_doc_updated(lib_kw, max_kw_lenght, DOC_CHANGED)) + table_body.append(_table_doc_updated(lib_kw, max_kw_length, DOC_CHANGED)) for project_kw in project_translation: if project_kw not in library_translation: table_body.append( - _table_doc_updated(project_kw, max_kw_lenght, NO_LIB_KEYWORD) + _table_doc_updated(project_kw, max_kw_length, NO_LIB_KEYWORD) ) if not table_body: return [] - table = _get_heading(max_kw_lenght) + table = _get_heading(max_kw_length) table.extend(table_body) return table diff --git a/utest/test/entry/test_entry_point.py b/utest/test/entry/test_entry_point.py index 3805af968..fcbc10bbf 100644 --- a/utest/test/entry/test_entry_point.py +++ b/utest/test/entry/test_entry_point.py @@ -6,8 +6,8 @@ from SeleniumLibrary.entry.get_versions import get_version from SeleniumLibrary.entry.translation import ( - compare_translatoin, - get_library_translaton, + compare_translation, + get_library_translation, ) @@ -25,7 +25,7 @@ def test_version(): def test_get_translation(): - data = get_library_translaton() + data = get_library_translation() for item in data.values(): assert item["name"], item["name"] assert item["doc"], item["doc"] @@ -34,19 +34,19 @@ def test_get_translation(): def test_compare_translation(tmp_path: Path): translation = tmp_path / "translation.json" - data = get_library_translaton() + data = get_library_translation() with translation.open("w") as file: json.dump(data, file, indent=4) - table = compare_translatoin(translation, data) + table = compare_translation(translation, data) verify_all("No changes", table) def test_compare_translation_changes(tmp_path: Path): translation = tmp_path / "translation.json" - data = get_library_translaton() + data = get_library_translation() data.pop("handle_alert", None) data["alert_should_be_present"]["sha256"] = "foo" with translation.open("w") as file: json.dump(data, file, indent=4) - table = compare_translatoin(translation, get_library_translaton()) + table = compare_translation(translation, get_library_translation()) verify_all("Changes", table) From 23d8514e41ce4bd48f44aa9f356dbf3db2ab0c5e Mon Sep 17 00:00:00 2001 From: Ed Manlove Date: Sun, 9 Jun 2024 15:46:25 -0400 Subject: [PATCH 3/6] Fixed couple checks on expected log messages under atest --- atest/acceptance/multiple_browsers_service.robot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/atest/acceptance/multiple_browsers_service.robot b/atest/acceptance/multiple_browsers_service.robot index d92445165..e47c917a0 100644 --- a/atest/acceptance/multiple_browsers_service.robot +++ b/atest/acceptance/multiple_browsers_service.robot @@ -9,8 +9,8 @@ Documentation Creating test which would work on all browser is not possible. *** Test Cases *** Chrome Browser With Chrome Service As String [Documentation] - ... LOG 2:2 DEBUG STARTS: Started executable: - ... LOG 2:3 DEBUG GLOB: POST*/session* + ... LOG 2:3 DEBUG STARTS: Started executable: + ... LOG 2:4 DEBUG GLOB: POST*/session* ${driver_path}= Get Driver Path Chrome Open Browser ${FRONT PAGE} Chrome remote_url=${REMOTE_URL} ... service=executable_path='${driver_path}' @@ -24,8 +24,8 @@ Chrome Browser With Chrome Service As String With service_args As List Firefox Browser With Firefox Service As String [Documentation] - ... LOG 2:2 DEBUG STARTS: Started executable: - ... LOG 2:3 DEBUG GLOB: POST*/session* + ... LOG 2:3 DEBUG STARTS: Started executable: + ... LOG 2:4 DEBUG GLOB: POST*/session* ${driver_path}= Get Driver Path Firefox Open Browser ${FRONT PAGE} Firefox remote_url=${REMOTE_URL} ... service=executable_path='${driver_path}' From 0a1eeaea7e47123668d59e16465f5a6d3edbaf7a Mon Sep 17 00:00:00 2001 From: Ed Manlove Date: Sun, 9 Jun 2024 15:47:05 -0400 Subject: [PATCH 4/6] Fixed a couple of expected results under utests --- ...cumentation.test_many_plugins.approved.txt | 21 ++++++++++--------- ...t_compare_translation_changes.approved.txt | 8 +++---- 2 files changed, 15 insertions(+), 14 deletions(-) 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 ba499567f..8cb99a1ea 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 @@ -489,16 +489,16 @@ Plugin API is new SeleniumLibrary 4.0 = Language = -SeleniumLibrary offers possibility to translte keyword names and documentation to new language. If language +SeleniumLibrary offers the possibility to translate keyword names and documentation to new language. If language is defined, SeleniumLibrary will search from [https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#module-search-path | module search path] -Python packages starting with `robotframework_seleniumlibrary_translation` by using -[https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/ | Python pluging API]. Library +for Python packages starting with `robotframework-seleniumlibrary-translation` by using the +[https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/ | Python pluging API]. The Library is using naming convention to find Python plugins. -The package must implement single API call, ``get_language`` without any arguments. Method must return a +The package must implement a single API call, ``get_language`` without any arguments. The method must return a dictionary containing two keys: ``language`` and ``path``. The language key value defines which language -the package contains. Also value should match (case insentive) the library ``language`` import parameter. +the package contains. Also the value should match (case insensitive) the library ``language`` import parameter. The path parameter value should be full path to the translation file. == Translation file == @@ -507,8 +507,8 @@ The file name or extension is not important, but data must be in [https://www.js format. The keys of json are the methods names, not the keyword names, which implements keywords. Value of key is json object which contains two keys: ``name`` and ``doc``. The ``name`` key contains the keyword translated name and `doc` contains translated documentation. Providing doc and name are optional, example -translation json file can only provide translations to keyword names or only to documentatin. But it is -always recomended to provide translation to both name and doc. Special key ``__intro__`` is for class level +translation json file can only provide translations to keyword names or only to documentation. But it is +always recommended to provide translation to both name and doc. Special key ``__intro__`` is for class level documentation and ``__init__`` is for init level documentation. These special values ``name`` can not be translated, instead ``name`` should be kept the same. @@ -519,9 +519,10 @@ Template translation file, with English language can be created by running: languages, it only provides easy way to create full list keywords and their documentation in correct format. It is also possible to add keywords from library plugins by providing `--plugings` arguments to command. Example: `rfselib translation --plugings myplugin.SomePlugin /path/to/translation.json` The -genered json file contains `sha256` key, which constains the sha256 sum of the library documentation, -the sha256 sum is used by `rfselib translation --compare /path/to/translation.json` command, which compares -transation to to library and prints outs a table which tell if there are changes needed for translation file. +generated json file contains `sha256` key, which contains the sha256 sum of the library documentation. +The sha256 sum is used by `rfselib translation --compare /path/to/translation.json` command, which compares +the translation to the library and prints outs a table which tells if there are changes needed for +translation file. Example project for translation can be found from [https://github.com/MarketSquare/robotframework-seleniumlibrary-translation-fi | robotframework-seleniumlibrary-translation-fi] diff --git a/utest/test/entry/approved_files/test_entry_point.test_compare_translation_changes.approved.txt b/utest/test/entry/approved_files/test_entry_point.test_compare_translation_changes.approved.txt index 6b19a6600..3feb0a024 100644 --- a/utest/test/entry/approved_files/test_entry_point.test_compare_translation_changes.approved.txt +++ b/utest/test/entry/approved_files/test_entry_point.test_compare_translation_changes.approved.txt @@ -1,6 +1,6 @@ Changes -0) | Keyword name | Reason | -1) | ---------------------------------------- | -------------------------------------- | -2) | alert_should_be_present | Documentation update needed | -3) | handle_alert | Keyword is missing translation | +0) | Keyword name | Reason | +1) | ---------------------------------------- | --------------------------------------- | +2) | alert_should_be_present | Documentation update needed | +3) | handle_alert | Keyword is missing translation | From 51a69dbf7eaff765ec5825f487b0d05a7af03ff4 Mon Sep 17 00:00:00 2001 From: Ed Manlove Date: Sun, 9 Jun 2024 19:57:54 -0400 Subject: [PATCH 5/6] Resolved log checks with some atests --- .../event_firing_webdriver.robot | 4 ++-- atest/acceptance/create_webdriver.robot | 2 +- .../keywords/page_load_timeout.robot | 4 ++-- .../multiple_browsers_options.robot | 24 +++++++++---------- atest/acceptance/open_and_close.robot | 4 ++-- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot b/atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot index 2ee7904a1..5e9a07e6d 100644 --- a/atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot +++ b/atest/acceptance/2-event_firing_webdriver/event_firing_webdriver.robot @@ -12,8 +12,8 @@ ${event_firing_or_none} ${NONE} Open Browser To Start Page [Tags] NoGrid [Documentation] - ... LOG 1:31 DEBUG Wrapping driver to event_firing_webdriver. - ... LOG 1:33 INFO Got driver also from SeleniumLibrary. + ... LOG 1:30 DEBUG Wrapping driver to event_firing_webdriver. + ... LOG 1:32 INFO Got driver also from SeleniumLibrary. Open Browser ${FRONT_PAGE} ${BROWSER} remote_url=${REMOTE_URL} Event Firing Webdriver Go To (WebDriver) diff --git a/atest/acceptance/create_webdriver.robot b/atest/acceptance/create_webdriver.robot index 0ee079522..9f3796ddf 100644 --- a/atest/acceptance/create_webdriver.robot +++ b/atest/acceptance/create_webdriver.robot @@ -7,7 +7,7 @@ Library Collections Create Webdriver Creates Functioning WebDriver [Documentation] ... LOG 1:1 INFO REGEXP: Creating an instance of the \\w+ WebDriver. - ... LOG 1:19 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+. + ... LOG 1:18 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+. [Tags] Known Issue Internet Explorer Known Issue Safari [Setup] Set Driver Variables Create Webdriver ${DRIVER_NAME} kwargs=${KWARGS} diff --git a/atest/acceptance/keywords/page_load_timeout.robot b/atest/acceptance/keywords/page_load_timeout.robot index a39df7d50..100bfe2c7 100644 --- a/atest/acceptance/keywords/page_load_timeout.robot +++ b/atest/acceptance/keywords/page_load_timeout.robot @@ -7,8 +7,8 @@ Test Teardown Close Browser And Reset Page Load Timeout *** Test Cases *** Should Open Browser With Default Page Load Timeout [Documentation] Verify that 'Open Browser' changes the page load timeout. - ... LOG 1.1.1:27 DEBUG REGEXP: POST http://localhost:\\d{2,5}/session/[a-f0-9-]+/timeouts {['\\\"]pageLoad['\\\"]: 300000} - ... LOG 1.1.1:29 DEBUG STARTS: Remote response: status=200 + ... LOG 1.1.1:26 DEBUG REGEXP: POST http://localhost:\\d{2,5}/session/[a-f0-9-]+/timeouts {['\\\"]pageLoad['\\\"]: 300000} + ... LOG 1.1.1:28 DEBUG STARTS: Remote response: status=200 # Note: previous log check was 33 and 37. Recording to see if something is swtiching back and forth Open Browser To Start Page diff --git a/atest/acceptance/multiple_browsers_options.robot b/atest/acceptance/multiple_browsers_options.robot index 40ce798d7..2349c9195 100644 --- a/atest/acceptance/multiple_browsers_options.robot +++ b/atest/acceptance/multiple_browsers_options.robot @@ -9,32 +9,32 @@ Documentation Creating test which would work on all browser is not possible. *** Test Cases *** Chrome Browser With Selenium Options As String [Documentation] - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("--disable-dev-shm-usage") Chrome Browser With Selenium Options As String With Attribute As True [Documentation] - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]--headless=new['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]--headless=new['\\\"].* Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) ; add_argument ( "--headless=new" ) Chrome Browser With Selenium Options With Complex Object [Tags] NoGrid [Documentation] - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]mobileEmulation['\\\"]: {['\\\"]deviceName['\\\"]: ['\\\"]Galaxy S5['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]mobileEmulation['\\\"]: {['\\\"]deviceName['\\\"]: ['\\\"]Galaxy S5['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument ( "--disable-dev-shm-usage" ) ; add_experimental_option( "mobileEmulation" , { 'deviceName' : 'Galaxy S5'}) Chrome Browser With Selenium Options Object [Documentation] - ... LOG 2:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 2:14 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* + ... LOG 2:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 2:13 DEBUG REGEXP: .*args['\\\"]: \\\[['\\\"]--disable-dev-shm-usage['\\\"].* ${options} = Get Chrome Options Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=${options} @@ -47,8 +47,8 @@ Chrome Browser With Selenium Options Invalid Method Chrome Browser With Selenium Options Argument With Semicolon [Documentation] - ... LOG 1:14 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* - ... LOG 1:14 DEBUG REGEXP: .*\\\[['\\\"]has;semicolon['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*['\\\"]goog:chromeOptions['\\\"].* + ... LOG 1:13 DEBUG REGEXP: .*\\\[['\\\"]has;semicolon['\\\"].* Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} ... desired_capabilities=${DESIRED_CAPABILITIES} options=add_argument("has;semicolon") diff --git a/atest/acceptance/open_and_close.robot b/atest/acceptance/open_and_close.robot index aad19deb9..6a0d7a75e 100644 --- a/atest/acceptance/open_and_close.robot +++ b/atest/acceptance/open_and_close.robot @@ -16,8 +16,8 @@ Close Browser Does Nothing When No Browser Is Opened Browser Open With Not Well-Formed URL Should Close [Documentation] Verify after incomplete 'Open Browser' browser closes - ... LOG 1.1:35 DEBUG STARTS: Opened browser with session id - ... LOG 1.1:35 DEBUG REGEXP: .*but failed to open url.* + ... LOG 1.1:34 DEBUG STARTS: Opened browser with session id + ... LOG 1.1:34 DEBUG REGEXP: .*but failed to open url.* ... LOG 2:2 DEBUG STARTS: DELETE ... LOG 2:5 DEBUG STARTS: Finished Request Run Keyword And Expect Error * Open Browser bad.url.bad ${BROWSER} From 8c62b7063a710200fb8d54d9866354ffd12687d1 Mon Sep 17 00:00:00 2001 From: Ed Manlove Date: Mon, 10 Jun 2024 13:44:48 -0400 Subject: [PATCH 6/6] Minor doc change for translations --- src/SeleniumLibrary/__init__.py | 2 +- .../PluginDocumentation.test_many_plugins.approved.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SeleniumLibrary/__init__.py b/src/SeleniumLibrary/__init__.py index e0e6ef459..ac3792813 100644 --- a/src/SeleniumLibrary/__init__.py +++ b/src/SeleniumLibrary/__init__.py @@ -583,7 +583,7 @@ class SeleniumLibrary(DynamicCore): generated json file contains `sha256` key, which contains the sha256 sum of the library documentation. The sha256 sum is used by `rfselib translation --compare /path/to/translation.json` command, which compares the translation to the library and prints outs a table which tells if there are changes needed for - translation file. + the translation file. Example project for translation can be found from [https://github.com/MarketSquare/robotframework-seleniumlibrary-translation-fi | robotframework-seleniumlibrary-translation-fi] 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 8cb99a1ea..9d442556c 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 @@ -522,7 +522,7 @@ to command. Example: `rfselib translation --plugings myplugin.SomePlugin /path/t generated json file contains `sha256` key, which contains the sha256 sum of the library documentation. The sha256 sum is used by `rfselib translation --compare /path/to/translation.json` command, which compares the translation to the library and prints outs a table which tells if there are changes needed for -translation file. +the translation file. Example project for translation can be found from [https://github.com/MarketSquare/robotframework-seleniumlibrary-translation-fi | robotframework-seleniumlibrary-translation-fi]