From ed4678096f44340bcea221261a22f03eb5827ffe Mon Sep 17 00:00:00 2001 From: Samiran Saha Date: Sun, 23 Nov 2025 22:26:18 +0530 Subject: [PATCH 1/3] pytest web working with selenium 4 - wa added --- mac/device-machine-allocation.sh | 4 +++- mac/env-setup-run.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mac/device-machine-allocation.sh b/mac/device-machine-allocation.sh index fbbe280..8a416c2 100644 --- a/mac/device-machine-allocation.sh +++ b/mac/device-machine-allocation.sh @@ -119,6 +119,8 @@ pick_terminal_devices() { bVersionLiteral="" mod=$(( i % 4 )) + local hardcodedBVersion=140 # python doesn't support dynamic latest versioning yet + if [ $((i % 4)) -ne 0 ]; then bVersionLiteral="-$mod" else @@ -133,7 +135,7 @@ pick_terminal_devices() { else yaml+=" - osVersion: $prefixEntry browserName: $suffixEntry - browserVersion: $bVersion + browserVersion: $(( hardcodedBVersion-i )) " fi diff --git a/mac/env-setup-run.sh b/mac/env-setup-run.sh index 34f7915..1b79f3c 100644 --- a/mac/env-setup-run.sh +++ b/mac/env-setup-run.sh @@ -203,6 +203,7 @@ setup_web_python() { detect_setup_python_env pip3 install -r requirements.txt >> "$NOW_RUN_LOG_FILE" 2>&1 + pip3 uninstall -y pytest-html pytest-rerunfailures >> "$NOW_RUN_LOG_FILE" 2>&1 log_success "Dependencies installed" # Update YAML at root level (browserstack.yml) From 59c82325c966453e1a748d4519be1c6b9b213d15 Mon Sep 17 00:00:00 2001 From: Samiran Saha Date: Mon, 24 Nov 2025 00:23:00 +0530 Subject: [PATCH 2/3] pytest fixes for app --- mac/env-setup-run.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/mac/env-setup-run.sh b/mac/env-setup-run.sh index 1b79f3c..ae46fd4 100644 --- a/mac/env-setup-run.sh +++ b/mac/env-setup-run.sh @@ -270,7 +270,14 @@ setup_app_python() { local platform_yaml export BSTACK_PARALLELS=1 - export BROWSERSTACK_CONFIG_FILE="./android/browserstack.yml" + + # Decide which directory to run based on APP_PLATFORM (default to android) + local run_dir="android" + if [ "$APP_PLATFORM" = "ios" ]; then + run_dir="ios" + fi + + export BROWSERSTACK_CONFIG_FILE="./$run_dir/browserstack.yml" platform_yaml=$(generate_mobile_platforms "$TEAM_PARALLELS_MAX_ALLOWED_MOBILE" "yaml") cat >> "$BROWSERSTACK_CONFIG_FILE" <> "$NOW_RUN_LOG_FILE" 2>&1 || return 1 + cd "$run_dir" && browserstack-sdk pytest -s bstack_sample.py >> "$NOW_RUN_LOG_FILE" 2>&1 || return 1 & cmd_pid=$!|| return 1 + show_spinner "$cmd_pid" + wait "$cmd_pid" ) deactivate From 9e4cd9485c7a9ff86891b861ef2494eea4efa923 Mon Sep 17 00:00:00 2001 From: Samiran Saha Date: Mon, 24 Nov 2025 11:56:22 +0530 Subject: [PATCH 3/3] py 3.12 --- .github/workflows/test-scripts.yml | 12 ++++++------ mac/env-setup-run.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-scripts.yml b/.github/workflows/test-scripts.yml index 7e88c61..3b49148 100644 --- a/.github/workflows/test-scripts.yml +++ b/.github/workflows/test-scripts.yml @@ -20,10 +20,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python 3.13 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: '3.12' - name: Set up Bash run: | echo "Bash version:" @@ -179,10 +179,10 @@ jobs: # steps: # - name: Checkout code # uses: actions/checkout@v4 - # - name: Set up Python 3.13 + # - name: Set up Python 3.12 # uses: actions/setup-python@v5 # with: - # python-version: '3.13' + # python-version: '3.12' # - name: Check PowerShell version # run: | # $PSVersionTable.PSVersion @@ -322,10 +322,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python 3.13 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: '3.12' - name: Set up Bash run: | echo "Bash version:" diff --git a/mac/env-setup-run.sh b/mac/env-setup-run.sh index ae46fd4..f63679b 100644 --- a/mac/env-setup-run.sh +++ b/mac/env-setup-run.sh @@ -263,7 +263,7 @@ setup_app_python() { detect_setup_python_env # Install dependencies - pip install -r requirements.txt >> "$NOW_RUN_LOG_FILE" 2>&1 + pip3 install -r requirements.txt >> "$NOW_RUN_LOG_FILE" 2>&1 log_success "Dependencies installed" local app_url=$BROWSERSTACK_APP