Skip to content

Commit 24851a6

Browse files
committed
WIP
1 parent caae679 commit 24851a6

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

.github/workflows/e2e-tests-hybrid.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -270,27 +270,21 @@ jobs:
270270
# Configure WebDriverIO to use our Appium server
271271
echo "Configuring WebDriverIO to use our Appium server..."
272272
# Update the hostname to use our Appium server
273-
sed -i '' 's/hostname: .*/hostname: "localhost"/' wdio.conf.ts
274-
sed -i '' 's/port: [0-9]*/port: 4723/' wdio.conf.ts
273+
sed -i '' 's/port: 4723/port: 4723,\n hostname: "localhost"/' wdio.conf.ts
275274
276275
# Remove the appium service to prevent WebDriverIO from starting its own
277276
sed -i '' 's/services: \[.appium.\]/services: []/' wdio.conf.ts
278277
279278
# Increase timeout settings for better reliability
280-
sed -i '' 's/connectionRetryTimeout: [0-9]*/connectionRetryTimeout: 300000/' wdio.conf.ts
281-
sed -i '' 's/waitforTimeout: [0-9]*/waitforTimeout: 60000/' wdio.conf.ts
279+
sed -i '' 's/waitforTimeout: 30000/waitforTimeout: 60000/' wdio.conf.ts
282280
283281
# Get the UDID of the booted simulator
284282
SIMULATOR_UDID=$(xcrun simctl list devices | grep "$SIMULATOR_NAME" | grep "Booted" | grep -o '[A-F0-9-]\{36\}')
285283
echo "Booted simulator UDID: $SIMULATOR_UDID"
286284
287-
# Update device name and add UDID to match the booted simulator
285+
# Update device name to match the booted simulator
288286
echo "Updating wdio.conf.ts to use simulator: $SIMULATOR_NAME (UDID: $SIMULATOR_UDID)"
289-
sed -i '' "s/'appium:deviceName': '[^']*'/'appium:deviceName': '$SIMULATOR_NAME'/" wdio.conf.ts
290-
sed -i '' "s/\"appium:deviceName\": \"[^\"]*\"/\"appium:deviceName\": \"$SIMULATOR_NAME\"/" wdio.conf.ts
291-
292-
# Add UDID to the capabilities
293-
sed -i '' "s/'appium:autoAcceptAlerts': true/'appium:autoAcceptAlerts': true,\n 'appium:udid': '$SIMULATOR_UDID'/" wdio.conf.ts
287+
sed -i '' "s/'appium:deviceName': 'iPhone 16'/'appium:deviceName': '$SIMULATOR_NAME'/" wdio.conf.ts
294288
295289
# Verify the changes were made
296290
echo "Updated wdio.conf.ts device name and UDID:"
@@ -301,7 +295,17 @@ jobs:
301295
grep -A 20 -B 5 "capabilities:" wdio.conf.ts
302296
303297
# Add Appium capabilities to help with simulator boot issues
304-
sed -i '' 's/"appium:autoAcceptAlerts": true/"appium:autoAcceptAlerts": true,\n "appium:newCommandTimeout": 300,\n "appium:commandTimeouts": {"implicit": 30000},\n "appium:launchTimeout": 300000,\n "appium:deviceReadyTimeout": 300000,\n "appium:wdaLaunchTimeout": 300000,\n "appium:wdaConnectionTimeout": 300000,\n "appium:useNewWDA": true,\n "appium:autoLaunch": false,\n "appium:noReset": true,\n "appium:fullReset": false/' wdio.conf.ts
298+
echo "Adding timeout capabilities to wdio.conf.ts..."
299+
300+
# Add UDID and timeout capabilities to the iOS configuration
301+
sed -i '' 's/"appium:autoAcceptAlerts": true/"appium:autoAcceptAlerts": true,\n "appium:udid": "'$SIMULATOR_UDID'",\n "appium:newCommandTimeout": 300,\n "appium:commandTimeouts": {"implicit": 30000},\n "appium:launchTimeout": 300000,\n "appium:deviceReadyTimeout": 300000,\n "appium:wdaLaunchTimeout": 300000,\n "appium:wdaConnectionTimeout": 300000,\n "appium:useNewWDA": true,\n "appium:autoLaunch": false,\n "appium:noReset": true,\n "appium:fullReset": false/' wdio.conf.ts
302+
303+
# Also update the connection timeout
304+
sed -i '' 's/connectionRetryTimeout: 120000/connectionRetryTimeout: 300000/' wdio.conf.ts
305+
306+
# Verify the capabilities were added
307+
echo "Updated capabilities with timeouts:"
308+
grep -A 15 "appium:autoAcceptAlerts" wdio.conf.ts
305309
306310
# Try to launch the app manually to test simulator connectivity
307311
echo "Testing manual app launch..."

0 commit comments

Comments
 (0)