[kde-linux/os-autoinst-distri-kdelinux] lib/openqa: lib: allow to pass additional arguments to selenium script

Bhushan Shah <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 8841273f1e89ce10749939fbe8abb267ae7331d9 by Bhushan Shah.
Committed on 20/07/2026 at 11:55.
Pushed by bshah into branch 'master'.

lib: allow to pass additional arguments to selenium script

This will be used to pass additional args to the calamares install
script.

M  +3    -2    lib/openqa/cli_test.py

https://invent.kde.org/kde-linux/os-autoinst-distri-kdelinux/-/commit/8841273f1e89ce10749939fbe8abb267ae7331d9

diff --git a/lib/openqa/cli_test.py b/lib/openqa/cli_test.py
index f098742..d220873 100644
--- a/lib/openqa/cli_test.py
+++ b/lib/openqa/cli_test.py
@@ -17,6 +17,7 @@ def _cli_command(method):
     @functools.wraps(method)
     def wrapper(self, *args, user: user_manager.User | None = None, **kwargs) -> str:
         cmdline = method(self, *args, **kwargs)
+        diag(f'Running {cmdline} on SUT')
         try:
             output = self._run_transient(cmdline, user=user)
         finally:
@@ -76,10 +77,10 @@ class CliTest:
         return f'source {VENV_DIR}/bin/activate && python3 {script_path}'
 
     @_cli_command
-    def run_selenium(self, script_name: str = None, directory: str = None) -> str:
+    def run_selenium(self, script_name: str = None, directory: str = None, args: str = "") -> str:
         script_name = script_name or f"{self.name}.py"
         script_path = Path(directory or LIB_DIR) / "tests" / script_name
-        return f'source {VENV_DIR}/bin/activate && {LIB_DIR}/openqa-selenium-webdriver-at-spi-run {script_path}'
+        return f'source {VENV_DIR}/bin/activate && {LIB_DIR}/openqa-selenium-webdriver-at-spi-run {script_path} {args}'
 
     def _collect(self):
         try:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.