Skip to main content

Supported Commands

The Mobilewright engine is in beta and supports a part of the WebdriverIO API. This page lists what works today. A command that is not listed fails with:

The command "<name>" is not supported by @wdio/mobilecli-driver

The name in that message is the protocol command that WebdriverIO sent, which can differ from the command in your test. For example $('~login').click({ x: 10 }) reports performActions.

Supported​

WebdriverIONotes
$(selector), $$(selector)Accessibility id (~), id (id=) and class name, see Selectors.
click(), tap()A tap in the middle of the element, without options.
setValue(), addValue(), clearValue()string and number values. { mask: true } works.
getText(), getValue()See Read an element.
isDisplayed(), isEnabled()Do not wait.
waitForExist(), waitForDisplayed(), waitForEnabled()Also with reverse: true.
browser.hideKeyboard(), browser.isKeyboardShown()hideKeyboard() takes no strategy.
browser.getPageSource()Returns JSON, not XML.
browser.setTimeout({ implicit })Sets the timeout of the engine, see Timeouts.
expect matchersThe matchers that use these commands, such as toHaveText(), toBeDisplayed() and toBeEnabled().

Not supported yet​

These work with Appium and are not built for the Mobilewright engine yet:

AreaExamples
SelectorsXPath, -ios predicate string, -ios class chain, -android uiautomator, chained $('~list').$('~item')
Gesturesswipe(), scrollIntoView(), longPress(), pinch(), zoom(), dragAndDrop(), click() and tap() with options, browser.tap({ x, y })
ScreentakeScreenshot(), saveScreenshot(), orientation
Apps during a testlaunchApp(), closeApp(), installing or stopping an app. To start an app, use mobilecli:app.
Hybrid appsgetContexts(), switchContext(), webviews
Sessionsbrowser.reloadSession(), attaching to a running session
Device cloudsOnly local devices are supported. Support for device clouds is in progress.
Other mobile commandsThe other mobile commands and mobile: scripts with browser.execute()

More commands and selectors are added during the beta. To run a test that needs one of them today, run it with Appium: see Run the same tests with Appium.

Welcome! How can I help?

WebdriverIO AI Copilot