appiumwebdriver-ioappium-androidappium-ios

wdio appium locally not finding elements


Using WebdriverIO, we are successfully running web app tests on desktop browsers locally and on saucelabs for desktop browsers and mobile browsers.

We are trying to use the same tests on mobile iOS simulator and Android emulator on our local macOS machines unsuccessfully.

We are using webdriverIO 7.25.4 and appium 2.0, we are not using wdio's Appium Service. Both Android Emulator and iOS simulator start when running tests but the first test fail. Regardless of the element targeted we always get an error similar to this:

ERROR @wdio/utils:shim: Error: element ("#usernameInput") still not displayed after 10000ms

Capability looks like this:

{
    'platformName': 'ios',
    'appium:automationName': 'XCUITest',
    'appium:deviceName': 'iPad Pro (12.9-inch) (5th generation)',
    'appium:platformVersion': '16.0',
    'appium:fullReset': true,
    'appium:printPageSourceOnFindFailure': true,
},

Has anyone ever seen this before running appium locally?


Solution

  • If it helps anyone, turns out that I forgot to add browserName in the capabilities. All works fine now.

    {
        'platformName': 'ios',
        'browserName': 'Safari',
        'appium:automationName': 'XCUITest',
        'appium:deviceName': 'iPad Pro (12.9-inch) (5th generation)',
        'appium:platformVersion': '16.0',
        'appium:fullReset': true,
        'appium:printPageSourceOnFindFailure': true,
    },