Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 0 additions & 135 deletions .circleci/config.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Appium Flutter Integration Driver with Appium 3

on:
pull_request:
pull_request:

env:
CI: true

name: Appium Flutter Integration Driver
jobs:
Android_E2E_WDIO:
runs-on: ubuntu-latest
Expand All @@ -22,18 +26,15 @@ jobs:

- name: 'List files'
run: |
release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
android_app=$(echo "$asset_urls" | head -n 1)
version=$(grep 'appium_flutter_server:' README.md | awk '{print $2}')
android_app="https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/$version/app-debug.apk"
echo "$android_app"
ios_app=$(echo "$asset_urls" | tail -n 1)
echo "$ios_app"
curl -LO $android_app
ls ${{ github.workspace }}
echo "APP_PATH=${{ github.workspace }}/app-debug.apk" >> $GITHUB_ENV
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
Expand All @@ -49,7 +50,7 @@ jobs:
npm run build
- name: Install Drivers
run: |
npm install -g appium@2.19.0
npm install -g appium
appium driver list
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/appium3_ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
- run: npm install --no-package-lock
name: Install dependencies
- run: npm run build
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@
"webdriverio": "9.19.2"
},
"peerDependencies": {
"appium": "^2.5.4"
"appium": "^3.0.0"
},
"dependencies": {
"@appium/base-driver": "^9.16.4",
"appium-adb": "^12.4.4",
"appium-ios-device": "^2.7.20",
"appium-uiautomator2-driver": "^4.1.5",
"appium-xcuitest-driver": "9.1.2",
"@appium/base-driver": "^10.0.0",
"appium-adb": "^13.0.0",
"appium-ios-device": "^3.0.0",
"appium-uiautomator2-driver": "^5.0.0",
"appium-xcuitest-driver": "^10.0.0",
"async-retry": "^1.3.3",
"asyncbox": "^3.0.0",
"bluebird": "^3.7.2",
Expand Down
2 changes: 1 addition & 1 deletion src/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ export class AppiumFlutterDriver extends BaseDriver<FlutterDriverConstraints> {
// @ts-ignore
await this.proxydriver.adb.removePortForward(this.flutterPort);
}
await this.proxydriver?.deleteSession();
await this.proxydriver?.deleteSession(this.sessionId);
await super.deleteSession();
}

Expand Down
6 changes: 3 additions & 3 deletions src/iOS.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { AppiumFlutterDriver } from './driver';
// @ts-ignore
import { XCUITestDriver } from 'appium-xcuitest-driver';
import type { InitialOpts } from '@appium/types';
import { DEVICE_CONNECTIONS_FACTORY } from './iProxy';
import { XCUITestDriverOpts } from 'appium-xcuitest-driver/build/lib/driver';

export async function startIOSSession(
this: AppiumFlutterDriver,
...args: any[]
): Promise<XCUITestDriver> {
this.log.info(`Starting an IOS proxy session`);
const iosdriver = new XCUITestDriver({} as InitialOpts);
await iosdriver.createSession(...args);
const iosdriver = new XCUITestDriver({} as XCUITestDriverOpts);
await iosdriver.createSession.apply(iosdriver, args);
return iosdriver;
}

Expand Down
2 changes: 1 addition & 1 deletion wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const config: Options.Testrunner = {
basePath: '/wd/hub',
port: 4723,
log: join(process.cwd(), 'appium-logs', 'logs.txt'),
allowInsecure: 'chromedriver_autodownload,adb_shell',
allowInsecure: '*:chromedriver_autodownload,*:adb_shell',
},
},
],
Expand Down
Loading