iOS: MobileBy.AccessibilityId throws invalidOperationException


#1

Using:

vbnet, appium-dotnet-driver 3.0.0.2, Appium 1.9.1

This is the line of code that is throwing the exception. This issue occurs ONLY in iOS but not in Android.

MobileAppDriverWait.Until(ExpectedConditions.ElementIsVisible(MobileBy.AccessibilityId(fieldName)))

This is the exception:

Exception thrown: ‘System.InvalidOperationException’ : Method is not implemented

This is exception in the appium log:

[XCUITest] Executing command 'execute'
[W3C] Encountered internal error running command: NotImplementedError: Method is not implemented
[W3C]     at XCUITestDriver.callee$0$0$ (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/execute.js:13:11)
[W3C]     at tryCatch (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at invoke (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[W3C]     at enqueueResult (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
[W3C]     at new Promise ()
[W3C]     at new F (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
[W3C]     at AsyncIterator.enqueue (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
[W3C]     at AsyncIterator.prototype.(anonymous function) [as next] (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at Object.runtime.async (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
[W3C]     at XCUITestDriver.callee$0$0 [as execute] (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/build/lib/commands/execute.js:27:30)
[W3C]     at /Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:296:26
[W3C]     at tryCatcher (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/node_modules/bluebird/js/main/util.js:26:23)
[W3C]     at Promise._settlePromiseFromHandler (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/node_modules/bluebird/js/main/promise.js:510:31)
[W3C]     at Promise._settlePromiseAt (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/node_modules/bluebird/js/main/promise.js:584:18)
[W3C]     at Promise._settlePromiseAtPostResolution (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/node_modules/bluebird/js/main/promise.js:248:10)
[W3C]     at Async._drainQueue (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/node_modules/bluebird/js/main/async.js:128:12)
[W3C]     at Async._drainQueues (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/node_modules/bluebird/js/main/async.js:133:10)
[W3C]     at Immediate.Async.drainQueues [as _onImmediate] (/Applications/Appium 2.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/node_modules/bluebird/js/main/async.js:15:14)
[W3C]     at runCallback (timers.js:789:20)
[W3C]     at tryOnImmediate (timers.js:751:5)
[W3C]     at processImmediate [as _immediateCallback] (timers.js:722:5)
[HTTP] <-- POST /wd/hub/session/8a363b67-5d11-4bbc-bae7-e13f731dad08/execute/sync 405 9 ms - 3602

Any workaround for this? Thank you!