Hello there,
I’ve a problem of executing Selenium + Java + Appium tests on the iOS system.
Environment:
Appium: 2.11.3
Appium inspector: 2024.8.2
Java: 17.0.7 (LTS)
Device: iPhone 14
device system: iOS 18.0 (issue was active on 17.6.1 also)
laptop system: macOS 15.0 Sequoia (issue was active on 14.6 Sonoma also)
Xcode version: 16.0
Capabilities:
{
appium:app: "/path/to/app",
appium:autoAcceptAlerts: true,
appium:automationName: XCuiTest,
appium:bundleId: io.***.***,
appium:databaseEnabled: false,
appium:deviceName: iPhone 14,
appium:eventTimings: true,
appium:javascriptEnabled: true,
appium:locationContextEnabled: false,
appium:maxTypingFrequency: 10,
appium:networkConnectionEnabled: false,
appium:platformVersion: 18,
appium:processArguments: {args: [dev]},
appium:takesScreenshot: true,
appium:udid: ************,
appium:updatedWDABundleId: io.appium.WebDriverAgentRunner,
appium:useNewWDA: true,
appium:webStorageEnabled: false,
appium:xcodeOrgId: ******,
appium:xcodeSigningId: iPhone Developer,
platformName: IOS
}
I’ve tried to add next capabilities, but without help:
{
appium:waitForQuiescence: "false" or "true",
appium:waitForIdleTimeout: "10000" //ms
}
When I run test via Maven:
mvn clean test -Dtest=TestClass#testScenario -Denv=ios
it leads to:
AccHolderLoginTest>BaseTest.logoutUser:241 » WebDriver An unknown server-side error occurred while processing the command. Original error: -[XCUIApplicationProcess waitForQuiescenceIncludingAnimationsIdle:]: unrecognized selector sent to instance 0x3022b8d80
Build info: version: '4.24.0', revision: '748ffc9bc3'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '15.0', java.version: '17.0.7'
Driver info: io.appium.java_client.ios.IOSDriver
Command: [944b0e29-e4d3-4b37-bc84-6f1d81f4ae40, getPageSource {}]
The problem is in .getPageSource() which is used on some places in our code.
When I comment-out .getPageSource() from the code, test executes without any problems.
Putting out .getPageSource() from the code couldn’t be an solution, because I get same error when I want to inspect our app using Appium Inspector. Because Appium Inspector also calls .getPageSource() in background:
[944b0e29][XCUITestDriver@2864] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: -[XCUIApplicationProcess waitForQuiescenceIncludingAnimationsIdle:]: unrecognized selector sent to instance 0x30222d880
at errorFromW3CJsonCode (/Users/dusan.panic/.appium/node_modules/appium-xcuitest-driver/node_modules/@appium/base-driver/lib/protocol/errors.js:1112:25)
at ProxyRequestError.getActualError (/Users/dusan.panic/.appium/node_modules/appium-xcuitest-driver/node_modules/@appium/base-driver/lib/protocol/errors.js:981:14)
at JWProxy.command (/Users/dusan.panic/.appium/node_modules/appium-xcuitest-driver/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:353:19)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at XCUITestDriver.proxyCommand (/Users/dusan.panic/.appium/node_modules/appium-xcuitest-driver/lib/commands/proxy-helper.js:112:35)
at XCUITestDriver.getNativePageSource (/Users/dusan.panic/.appium/node_modules/appium-xcuitest-driver/lib/commands/source.js:32:7)
at XCUITestDriver.getPageSource (/Users/dusan.panic/.appium/node_modules/appium-xcuitest-driver/lib/commands/source.js:22:12)
[944b0e29][HTTP] <-- GET /session/944b0e29-e4d3-4b37-bc84-6f1d81f4ae40/source 500 21 ms - 1445
[944b0e29][HTTP] --> POST /session/944b0e29-e4d3-4b37-bc84-6f1d81f4ae40/timeouts {"implicit":1000}