Skip to content

Commit 76b6402

Browse files
authored
Merge branch 'main' into main
2 parents 022d1f2 + 5414336 commit 76b6402

9 files changed

Lines changed: 163 additions & 114 deletions

File tree

.circleci/config.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Use the latest 2.1 version of CircleCI pipeline process engine.
2+
# See: https://circleci.com/docs/configuration-reference
3+
4+
# For a detailed guide to building and testing on iOS, read the docs:
5+
# https://circleci.com/docs/testing-ios/
6+
on:
7+
pull_request:
8+
types: [opened, reopened]
9+
version: 2.1
10+
11+
# Define a job to be invoked later in a workflow.
12+
# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
13+
jobs:
14+
WDIO_IOS:
15+
# Specify the execution environment.
16+
# See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
17+
macos:
18+
# Specify the Xcode version you desire here
19+
# See: https://circleci.com/docs/using-macos/
20+
xcode: 15.2.0
21+
22+
# See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
23+
steps:
24+
# Checkout the code as the first step.
25+
- checkout
26+
- run: xcrun simctl list devices available
27+
- run:
28+
name: Node Version
29+
command: |
30+
nvm install v22.2.0 && nvm alias default 22.2.0
31+
- run:
32+
name: Install Appium and Run iOS Test
33+
command: |
34+
release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
35+
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
36+
ios_app=$(echo "$asset_urls" | tail -n 1)
37+
echo "$ios_app"
38+
curl -LO $ios_app
39+
echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
40+
echo $pwd
41+
echo ls
42+
nvm install v22.2.0 && nvm alias default 22.2.0
43+
node -v
44+
target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
45+
echo $target_sim_id
46+
echo 'export UDID=$target_sim_id' >> $BASH_ENV
47+
xcrun simctl boot $target_sim_id
48+
xcrun simctl bootstatus $target_sim_id -b
49+
npm install -g appium@2.19.0
50+
npm run build-flutter-by-service
51+
npm install --no-package-lock
52+
npm run build
53+
appium driver list
54+
appium driver run xcuitest build-wda
55+
wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
56+
echo $wda
57+
echo 'export WDA_PATH=$wda' >> $BASH_ENV
58+
echo ${WDA_PATH}
59+
echo ${PROJECT_ENV_VAR}
60+
xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
61+
xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
62+
mkdir appium-logs
63+
UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios
64+
65+
- store_artifacts:
66+
path: appium-logs
67+
# JAVA_IOS:
68+
# # Specify the execution environment.
69+
# # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
70+
# # Add steps to the job
71+
# # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
72+
# macos:
73+
# # Specify the Xcode version you desire here
74+
# # See: https://circleci.com/docs/using-macos/
75+
# xcode: 15.2.0
76+
# steps:
77+
# # Checkout the code as the first step.
78+
# - checkout
79+
# - run: xcrun simctl list devices available
80+
# - run:
81+
# name: Node Version
82+
# command: |
83+
# nvm install v22.2.0 && nvm alias default 22.2.0
84+
# - run:
85+
# name: Install Appium and Run iOS Test
86+
# command: |
87+
# release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
88+
# asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
89+
# ios_app=$(echo "$asset_urls" | tail -n 1)
90+
# echo "$ios_app"
91+
# curl -LO $ios_app
92+
# echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
93+
# echo $APP_PATH
94+
# nvm install v22.2.0 && nvm alias default 22.2.0
95+
# node -v
96+
# target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
97+
# echo $target_sim_id
98+
# echo 'export UDID=$target_sim_id' >> $BASH_ENV
99+
# xcrun simctl boot $target_sim_id
100+
# xcrun simctl bootstatus $target_sim_id -b
101+
# npm install -g appium@2.19.0
102+
# npm install --no-package-lock
103+
# npm run build
104+
# appium driver list
105+
# appium driver run xcuitest build-wda
106+
# wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
107+
# echo $wda
108+
# echo 'export WDA_PATH=$wda' >> $BASH_ENV
109+
# echo ${WDA_PATH}
110+
# echo ${PROJECT_ENV_VAR}
111+
# xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
112+
# xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
113+
# mkdir appium-logs
114+
# git clone https://github.com/AppiumTestDistribution/flutter-finder.git
115+
# cd flutter-finder/flutter-by/java
116+
# UDID=$target_sim_id APP_PATH=$ios_app Platform=ios ./gradlew clean test --debug
117+
118+
# - store_artifacts:
119+
# path: flutter-finder/flutter-by/java/appium.log
120+
# # Orchestrate jobs using workflows
121+
# # See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
122+
workflows:
123+
ios: # This is the name of the workflow, feel free to change it to better match your workflow.
124+
# Inside the workflow, you define the jobs you want to run.
125+
jobs:
126+
- WDIO_IOS:
127+
filters:
128+
branches:
129+
ignore:
130+
- main
131+
# - JAVA_IOS:
132+
# filters:
133+
# branches:
134+
# ignore:
135+
# - main

.github/workflows/appium3_ios.yml

Lines changed: 0 additions & 91 deletions
This file was deleted.
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
name: Appium Flutter Integration Driver with Appium 3
2-
31
on:
4-
pull_request:
5-
6-
env:
7-
CI: true
2+
pull_request:
83

4+
name: Appium Flutter Integration Driver
95
jobs:
106
Android_E2E_WDIO:
117
runs-on: ubuntu-latest
@@ -26,15 +22,18 @@ jobs:
2622

2723
- name: 'List files'
2824
run: |
29-
version=$(grep 'appium_flutter_server:' README.md | awk '{print $2}')
30-
android_app="https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/$version/app-debug.apk"
25+
release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
26+
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
27+
android_app=$(echo "$asset_urls" | head -n 1)
3128
echo "$android_app"
29+
ios_app=$(echo "$asset_urls" | tail -n 1)
30+
echo "$ios_app"
3231
curl -LO $android_app
3332
ls ${{ github.workspace }}
3433
echo "APP_PATH=${{ github.workspace }}/app-debug.apk" >> $GITHUB_ENV
3534
- uses: actions/setup-node@v4
3635
with:
37-
node-version: 22
36+
node-version: 20
3837
- name: Enable KVM group perms
3938
run: |
4039
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
@@ -50,7 +49,7 @@ jobs:
5049
npm run build
5150
- name: Install Drivers
5251
run: |
53-
npm install -g appium
52+
npm install -g appium@2.19.0
5453
appium driver list
5554
- name: run tests
5655
uses: reactivecircus/android-emulator-runner@v2

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v2
1111
- uses: actions/setup-node@v4
1212
with:
13-
node-version: 22
13+
node-version: 20
1414
- run: npm install --no-package-lock
1515
name: Install dependencies
1616
- run: npm run build

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.5.1](https://github.com/AppiumTestDistribution/appium-flutter-integration-driver/compare/v1.5.0...v1.5.1) (2025-09-19)
2+
3+
### Reverts
4+
5+
* Revert "feat: Appium 3 support ([#142](https://github.com/AppiumTestDistribution/appium-flutter-integration-driver/issues/142))" ([#145](https://github.com/AppiumTestDistribution/appium-flutter-integration-driver/issues/145)) ([fbb22db](https://github.com/AppiumTestDistribution/appium-flutter-integration-driver/commit/fbb22dbb5a7ca17f2813b22e64517c4a406e42e6))
6+
17
## [1.5.0](https://github.com/AppiumTestDistribution/appium-flutter-integration-driver/compare/v1.4.1...v1.5.0) (2025-09-19)
28

39
### Features

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"appium",
66
"flutter"
77
],
8-
"version": "1.5.0",
8+
"version": "1.5.1",
99
"author": "",
1010
"license": "MIT License",
1111
"repository": {
@@ -91,14 +91,14 @@
9191
"webdriverio": "9.19.2"
9292
},
9393
"peerDependencies": {
94-
"appium": "^3.0.0"
94+
"appium": "^2.5.4"
9595
},
9696
"dependencies": {
97-
"@appium/base-driver": "^10.0.0",
98-
"appium-adb": "^13.0.0",
99-
"appium-ios-device": "^3.0.0",
100-
"appium-uiautomator2-driver": "^5.0.0",
101-
"appium-xcuitest-driver": "^10.0.0",
97+
"@appium/base-driver": "^9.16.4",
98+
"appium-adb": "^12.4.4",
99+
"appium-ios-device": "^2.7.20",
100+
"appium-uiautomator2-driver": "^4.1.5",
101+
"appium-xcuitest-driver": "9.1.2",
102102
"appium-mac2-driver": "^2.2.2",
103103
"async-retry": "^1.3.3",
104104
"asyncbox": "^3.0.0",

src/driver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ export class AppiumFlutterDriver extends BaseDriver<FlutterDriverConstraints> {
470470
// @ts-ignore
471471
await this.proxydriver.adb.removePortForward(this.flutterPort);
472472
}
473-
await this.proxydriver?.deleteSession(this.sessionId);
473+
await this.proxydriver?.deleteSession();
474474
await super.deleteSession();
475475
}
476476

src/iOS.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import type { AppiumFlutterDriver } from './driver';
22
// @ts-ignore
33
import { XCUITestDriver } from 'appium-xcuitest-driver';
4+
import type { InitialOpts } from '@appium/types';
45
import { DEVICE_CONNECTIONS_FACTORY } from './iProxy';
5-
import { XCUITestDriverOpts } from 'appium-xcuitest-driver/build/lib/driver';
66

77
export async function startIOSSession(
88
this: AppiumFlutterDriver,
99
...args: any[]
1010
): Promise<XCUITestDriver> {
1111
this.log.info(`Starting an IOS proxy session`);
12-
const iosdriver = new XCUITestDriver({} as XCUITestDriverOpts);
13-
await iosdriver.createSession.apply(iosdriver, args);
12+
const iosdriver = new XCUITestDriver({} as InitialOpts);
13+
await iosdriver.createSession(...args);
1414
return iosdriver;
1515
}
1616

wdio.conf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const config: Options.Testrunner = {
126126
basePath: '/wd/hub',
127127
port: 4723,
128128
log: join(process.cwd(), 'appium-logs', 'logs.txt'),
129-
allowInsecure: '*:chromedriver_autodownload,*:adb_shell',
129+
allowInsecure: 'chromedriver_autodownload,adb_shell',
130130
},
131131
},
132132
],

0 commit comments

Comments
 (0)