diff --git a/atest/acceptance/entry_point.robot b/atest/acceptance/entry_point.robot new file mode 100644 index 000000000..a92c3740a --- /dev/null +++ b/atest/acceptance/entry_point.robot @@ -0,0 +1,36 @@ +*** Settings *** +Library Process + + +*** Test Cases *** +Entry Point Version + ${process} = Run Process + ... python -m SeleniumLibrary.entry --version + ... shell=True + ... cwd=${EXECDIR}/src + Log ${process.stdout} + Log ${process.stderr} + Should Be Equal As Integers ${process.rc} 0 + Should Be Empty ${process.stderr} + Should Contain ${process.stdout} Used Python is: + Should Contain ${process.stdout} Installed selenium version is: + +Entry Point Translation + ${process} = Run Process + ... python -m SeleniumLibrary.entry translation ${OUTPUT_DIR}/translation.json + ... shell=True + ... cwd=${EXECDIR}/src + Log ${process.stdout} + Log ${process.stderr} + Should Be Equal As Integers ${process.rc} 0 + Should Be Empty ${process.stderr} + Should Be Equal ${process.stdout} Translation file created in ${OUTPUT_DIR}/translation.json + ${process} = Run Process + ... python -m SeleniumLibrary.entry translation --compare ${OUTPUT_DIR}/translation.json + ... shell=True + ... cwd=${EXECDIR}/src + Log ${process.stdout} + Log ${process.stderr} + Should Be Equal As Integers ${process.rc} 0 + Should Be Empty ${process.stderr} + Should Be Equal ${process.stdout} Translation is valid, no updated needed. diff --git a/src/SeleniumLibrary/entry/__main__.py b/src/SeleniumLibrary/entry/__main__.py index 21a6896e6..e8b886118 100644 --- a/src/SeleniumLibrary/entry/__main__.py +++ b/src/SeleniumLibrary/entry/__main__.py @@ -49,7 +49,7 @@ def cli(): required=True, ) @click.option( - "--plugin", + "--plugins", help="Same as plugins argument in the library import.", default=None, type=str, @@ -97,7 +97,7 @@ def translation( print("Translation is valid, no updated needed.") else: with filename.open("w") as file: - json.dump(translation, file, indent=4) + json.dump(lib_translation, file, indent=4) print(f"Translation file created in {filename.absolute()}") diff --git a/src/SeleniumLibrary/entry/get_versions.py b/src/SeleniumLibrary/entry/get_versions.py index 9c78f7d36..51e68da7a 100644 --- a/src/SeleniumLibrary/entry/get_versions.py +++ b/src/SeleniumLibrary/entry/get_versions.py @@ -45,7 +45,7 @@ def get_version(): ) return ( f"\nUsed Python is: {sys.executable}\n\tVersion: {python_version}\n" - f'Robot Framework version: "{get_rf_version()}\n"' + f'Robot Framework version: "{get_rf_version()}"\n' f"Installed SeleniumLibrary version is: {get_library_version()}\n" f"Installed selenium version is: {__version__}\n" ) diff --git a/utest/test/translation/test_translation.py b/utest/test/translation/test_translation.py index c6726a21a..7d1255241 100644 --- a/utest/test/translation/test_translation.py +++ b/utest/test/translation/test_translation.py @@ -8,7 +8,6 @@ @pytest.fixture() def sl() -> SeleniumLibrary: - d = Path(__file__).parent.parent.absolute() sys.path.append(str(Path(__file__).parent.parent.absolute())) return SeleniumLibrary(language="FI")