mardi 26 juillet 2016

UiAutomationService had registered when using monkeyrunner and uiautomator APIs

I learn Automated Performance Testing here.

I want to replace Espresso with UI Automator because I do unit-testing without sorce code. When I replaced and ran the testing project, I got the error:

java.lang.IllegalStateException: UiAutomationService android.accessibilityservice.IAccessibilityServiceClient$Stub$Proxy@2005e32already registered!
at android.os.Parcel.readException(Parcel.java:1628)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.IUiAutomationConnection$Stub$Proxy.connect(IUiAutomationConnection.java:236)
at android.app.UiAutomation.connect(UiAutomation.java:197)
.....

I guess is that both of Monkeyrunner and UI Automator use the UiAutomationService at the same time.

How can I fix it?

(I do not know how to connect the device in a sequence (one after the other))

connection sequence : Monkeyrunner --> UI Automator --> Monkeyrunner

Aucun commentaire:

Enregistrer un commentaire