fix: safe parse element locators when used in flutter commands #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: iOS WDIO Tests with Appium 3 | |
| on: | |
| pull_request: | |
| env: | |
| CI: true | |
| SHOW_XCODE_LOG: true | |
| PREBUILT_WDA_PATH: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app | |
| jobs: | |
| wdio_ios: | |
| runs-on: macos-26 | |
| name: WDIO iOS (Xcode 16.4) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Node.js 22.x | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22.x' | |
| - name: Select Xcode 16.4 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.4' | |
| - name: List Installed Simulators | |
| run: xcrun simctl list devices available | |
| - name: Install jq | |
| run: brew install jq | |
| - run: | | |
| version=$(grep 'appium_flutter_server:' README.md | awk '{print $2}') | |
| ios_app="https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/$version/ios.zip" | |
| echo "Downloading from: $ios_app" | |
| curl -LO "$ios_app" | |
| echo "APP_PATH=$(pwd)/ios.zip" >> $GITHUB_ENV | |
| name: Download sample iOS app | |
| - name: Start iOS Simulator UI | |
| run: open -Fn "$(xcode-select --print-path)/Applications/Simulator.app" | |
| - name: Boot simulator | |
| id: prepareSimulator | |
| uses: futureware-tech/simulator-action@v4 | |
| with: | |
| model: 'iPhone 16' | |
| os_version: '18.5' | |
| shutdown_after_job: false | |
| wait_for_boot: true | |
| - run: | | |
| target_sim_id=$(xcrun simctl list devices available | grep -A 10 "Booted" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1) | |
| echo "Target sim id: $target_sim_id" | |
| echo "udid=$target_sim_id" >> $GITHUB_ENV | |
| - run: | | |
| npm install -g appium | |
| npm install --no-package-lock | |
| npm run build-flutter-by-service | |
| npm run build | |
| name: Install Appium and deps | |
| - run: | | |
| appium driver list | |
| appium driver doctor xcuitest | |
| appium driver run xcuitest download-wda-sim --platform=ios --outdir=$(dirname "$PREBUILT_WDA_PATH") | |
| echo "WDA path: $PREBUILT_WDA_PATH" | |
| echo "WDA_PATH=$PREBUILT_WDA_PATH" >> $GITHUB_ENV | |
| name: Build WDA with XCUITest driver | |
| - run: | | |
| echo "UDID: $udid" | |
| echo "WDA path: $PREBUILT_WDA_PATH" | |
| xcrun simctl install $udid $PREBUILT_WDA_PATH | |
| xcrun simctl launch $udid "com.facebook.WebDriverAgentRunner.xctrunner" | |
| name: Install and launch WDA on Simulator | |
| - run: | | |
| mkdir -p appium-logs | |
| UDID=$udid APP_PATH=$APP_PATH npm run wdio-ios | tee appium-logs/logs.txt | |
| name: Run WDIO iOS | |
| - name: Upload logs | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: appium-logs | |
| path: appium-logs |