diff --git a/.github/workflows/LT_android_workflow.yml b/.github/workflows/LT_android_workflow.yml index c4dfe1ce..8b4e2449 100644 --- a/.github/workflows/LT_android_workflow.yml +++ b/.github/workflows/LT_android_workflow.yml @@ -8,7 +8,7 @@ env: on: schedule: - - cron: '0 21 * * *' + - cron: '30 18 * * *' workflow_dispatch: inputs: tags: @@ -57,7 +57,7 @@ jobs: env source $HOME/.bp-venv/bin/activate - python -m pytest -v --driver Appium --selenium-host '${{secrets.LT_USERNAME}}:${{secrets.LT_ACCESS_KEY}}@hub.lambdatest.com' \ + python -m pytest -v --driver Appium --selenium-host '${{secrets.LT_USERNAME}}:${{secrets.LT_ACCESS_KEY}}@mobile-hub.lambdatest.com' \ --variables ${{ matrix.config_file }} --tags="${{ matrix.tags }}" \ --html=report.html \ --self-contained-html \ @@ -119,7 +119,7 @@ jobs: env source $HOME/.bp-venv/bin/activate python -m pytest -v --driver Appium \ - --selenium-host '${{secrets.LT_USERNAME}}:${{secrets.LT_ACCESS_KEY}}@hub.lambdatest.com' \ + --selenium-host '${{secrets.LT_USERNAME}}:${{secrets.LT_ACCESS_KEY}}@mobile-hub.lambdatest.com' \ --variables './env_configs/lamdatest/android_mobile_LT.json' \ --tags="$TAGS" --html=report.html \ --self-contained-html diff --git a/.github/workflows/LT_ios_workflow.yml b/.github/workflows/LT_ios_workflow.yml index 41dac90d..8b96134a 100644 --- a/.github/workflows/LT_ios_workflow.yml +++ b/.github/workflows/LT_ios_workflow.yml @@ -8,7 +8,7 @@ env: on: schedule: - - cron: '0 19 * * *' + - cron: '30 20 * * *' workflow_dispatch: inputs: tags: @@ -57,7 +57,7 @@ jobs: env source $HOME/.bp-venv/bin/activate - python -m pytest -v --driver Appium --selenium-host '${{secrets.LT_USERNAME}}:${{secrets.LT_ACCESS_KEY}}@hub.lambdatest.com' \ + python -m pytest -v --driver Appium --selenium-host '${{secrets.LT_USERNAME}}:${{secrets.LT_ACCESS_KEY}}@mobile-hub.lambdatest.com' \ --variables ${{ matrix.config_file }} --tags="${{ matrix.tags }}" \ --html=report.html \ --self-contained-html \ @@ -119,7 +119,7 @@ jobs: env source $HOME/.bp-venv/bin/activate python -m pytest -v --driver Appium \ - --selenium-host '${{secrets.LT_USERNAME}}:${{secrets.LT_ACCESS_KEY}}@hub.lambdatest.com' \ + --selenium-host '${{secrets.LT_USERNAME}}:${{secrets.LT_ACCESS_KEY}}@mobile-hub.lambdatest.com' \ --variables './env_configs/lamdatest/ios_mobile_LT.json' \ --tags="$TAGS" --html=report.html \ --self-contained-html diff --git a/.github/workflows/LT_ui_workflow.yml b/.github/workflows/LT_ui_workflow.yml index c9280b33..cf387352 100644 --- a/.github/workflows/LT_ui_workflow.yml +++ b/.github/workflows/LT_ui_workflow.yml @@ -11,7 +11,7 @@ env: on: schedule: - - cron: '0 * * * *' + - cron: '30 22 * * *' workflow_dispatch: inputs: tags: diff --git a/env_configs/lamdatest/io_mobile_LT.json b/env_configs/lamdatest/ios_mobile_LT.json similarity index 87% rename from env_configs/lamdatest/io_mobile_LT.json rename to env_configs/lamdatest/ios_mobile_LT.json index 0f27a83d..ff118e22 100644 --- a/env_configs/lamdatest/io_mobile_LT.json +++ b/env_configs/lamdatest/ios_mobile_LT.json @@ -1,6 +1,6 @@ { "capabilities": { - "platformName": "ios", + "platformName": "iOS", "deviceName": "iPhone 15 Plus", "platformVersion": "17", "isRealMobile": "True", diff --git a/main/frontend/frontend_plugin.py b/main/frontend/frontend_plugin.py index 6966a0e7..6434af79 100644 --- a/main/frontend/frontend_plugin.py +++ b/main/frontend/frontend_plugin.py @@ -280,6 +280,29 @@ def driver_kwargs(capabilities, host, port, **kwargs): # noqa appium.driver_kwargs = driver_kwargs + elif os.environ.get("USING_ENV", "") == 'LAMDATEST' and session_capabilities.get("platformName", "").lower() in ( + "android", "ios"): + value, options = driver_options_factory + + for k, v in session_capabilities.items(): + options.set_capability(k, v) + + def driver_kwargs(capabilities, host, port, **kwargs): # noqa + _ = capabilities + if value in ("chrome", "edge", "firefox"): + browser_options = kwargs.get(f"{value}_options", None) + browser_options_arguments = getattr(browser_options, "arguments", []) + browser_options_capabilities = getattr(browser_options, "capabilities", {}) + options.capabilities.update(browser_options_capabilities) + options.arguments.extend([x for x in browser_options_arguments if x not in options.arguments]) + + executor = f"https://{host}/wd/hub" + kwargs = {"command_executor": executor, "options": options} + + return kwargs + + appium.driver_kwargs = driver_kwargs + # To pass options for local Android and iOS test executions elif session_capabilities.get("platformName", "").lower() in ("android", "ios"): value, options = driver_options_factory