Appium 和 UiAutomator2 自动化已经打开的应用程序

Appium & UiAutomator2 automate already opened app

如果有人能告诉我是否可以从已打开的 android 应用程序 运行 使用 UiAutomator2 驱动程序进行测试,我将不胜感激。如果是,能否请您告诉我如何操作,我应该使用什么capablilities/options。

信息:我正在使用 javascript + webdriverio 来编写我的测试。

提前致谢, 沃尔克

The way to start a session using the UiAutomator2 driver is to include the automationName capability in your new session request, with the value UiAutomator2. Of course, you must also include appropriate platformName (=Android), platformVersion, deviceName, and app capabilities, at a minimum.

Check here