Skip to main content

Supported Commands

The Mobilecli 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​

CommandNotes
$(selector)Accessibility id (~), id (id=) and class name, see Selectors.
$$(selector)Accessibility id (~), id (id=) and class name, see Selectors.
$(selector).click()A tap in the middle of the element, without options.
$(selector).tap()A tap in the middle of the element, without options. browser.tap() is not supported yet.
$(selector).setValue()string and number values. { mask: true } works.
$(selector).addValue()string and number values. { mask: true } works.
$(selector).clearValue()
$(selector).getText()The text, else the label, else the value, see Read an element.
$(selector).getValue()See Read an element.
$(selector).isDisplayed()Does not wait.
$(selector).isEnabled()Does not wait.
$(selector).waitForExist()Also with reverse: true.
$(selector).waitForDisplayed()Also with reverse: true.
$(selector).waitForEnabled()Also with reverse: true.
browser.hideKeyboard()Takes no strategy.
browser.isKeyboardShown()
browser.getPageSource()Returns JSON, not XML.
browser.setTimeout()Only implicit, which sets the timeout of the engine, see Timeouts.

The expect matchers that use these commands work as well, such as toHaveText(), toBeDisplayed() and toBeEnabled().

Not supported yet​

These work with Appium and are not built for the Mobilecli 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