webdriverio: [πŸ› Bug]: Throw meaningful error if .isClickable() Method is called in native context

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

latest

Mode

Standalone Mode

Which capabilities are you using?

config.capabilities = [
    {
        platformName: 'Android',
        automationName: 'UiAutomator2',
        deviceName: 'Pixel_3_11',
        platformVersion: '',
        maxInstances: 1,
        appWaitActivity: '*',
        app: join(process.cwd(), './apps/myApp.apk'),
        noReset: true,
        newCommandTimeout: 240

    },
];

What happened?

Getting if a Native Element is clickable or not using the method .isClickable() is returning an error NotImplementedError: Method is not implemented at AndroidUiautomator2Driver.execute

What is your expected behavior?

The method .isClickable() should return a boolean value if the element is clickable or not.

How to reproduce the bug.

To reproduce a bug:

Use a native app. Target any locator

$(β€˜//*[@content-desc=β€œContinue”]’).isClickable()

Relevant log output

NotImplementedError: Method is not implemented
    at AndroidUiautomator2Driver.execute (/Users/emilio.duarte/Documents/QuadPay/mobile-app-auto-tests/node_modules/appium/node_modules/appium-android-driver/lib/commands/execute.js:14:11)
    at commandExecutor (/Users/emilio.duarte/Documents/QuadPay/mobile-app-auto-tests/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:335:9)
    at /Users/emilio.duarte/Documents/QuadPay/mobile-app-auto-tests/node_modules/appium/node_modules/async-lock/lib/index.js:146:12
    at AsyncLock._promiseTry (/Users/emilio.duarte/Documents/QuadPay/mobile-app-auto-tests/node_modules/appium/node_modules/async-lock/lib/index.js:280:31)
    at exec (/Users/emilio.duarte/Documents/QuadPay/mobile-app-auto-tests/node_modules/appium/node_modules/async-lock/lib/index.js:145:9)
    at AsyncLock.acquire (/Users/emilio.duarte/Documents/QuadPay/mobile-app-auto-tests/node_modules/appium/node_modules/async-lock/lib/index.js:162:3)
    at AndroidUiautomator2Driver.executeCommand (/Users/emilio.duarte/Documents/QuadPay/mobile-app-auto-tests/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:348:39)
    at AppiumDriver.executeCommand (/Users/emilio.duarte/Documents/QuadPay/mobile-app-auto-tests/node_modules/appium/lib/appium.js:563:36)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at asyncHandler (/Users/emilio.duarte/Documents/QuadPay/mobile-app-auto-tests/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:297:21)

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (15 by maintainers)

Commits related to this issue

Most upvoted comments

I can pick this up in the coming week(s)