Appium error: App never showed up as active. appActivity: .MainActivity t5 != .MainActi vity

syl · 2014年03月19日 · 最后由 syl 回复于 2014年03月19日 · 1795 次阅读

info: Starting app
info: [ADB] Starting app
"E:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe" -s emulator-5
554 shell am start -n com.example.test/.MainActivity
info: Waiting for app's activity to become focused
info: Getting focused package and activity
info: Getting focused package and activity
error: App never showed up as active. appActivity: .MainActivity t5 != .MainActi
vity
info: [ADB] Sending command to android: {"cmd":"shutdown"}
info: Stopping logcat capture
error: Failed to start an Appium session, err was: Error: App never showed up as
active. appActivity: .MainActivity t5 != .MainActivity
info: Responding to client with error: {"status":6,"value":{"message":"A session
is either terminated or not started (Original error: App never showed up as act
ive. appActivity: .MainActivity t5 != .MainActivity)","origValue":"App never sho
wed up as active. appActivity: .MainActivity t5 != .MainActivity"},"sessionId":"
94c25eb1-edb5-4788-9f37-c4438c6eff22"}
POST /wd/hub/session 500 55296ms - 347
info: Clearing out appium devices
info: [ANDROID] [info] Got data from client: {"cmd":"shutdown"}
info: [ANDROID] [info] Got command of type SHUTDOWN
info: [ANDROID] [info] Returning result: {"value":"OK, shutting down","status":0
}
info: [ADB] Received command result from bootstrap
info: Sent shutdown command, waiting for ADB to stop...
info: [ANDROID] [info] Closed client connection

avd 上的 app 已经起来了
这是什么问题?有人指点一下吗?

共收到 2 条回复 时间 点赞

554 shell am start -n com.example.test/.MainActivity
info: Waiting for app's activity to become focused
info: Getting focused package and activity
info: Getting focused package and activity
error: App never showed up as active. appActivity: .MainActivity t5 != .MainActi
vity

请在 caps 中指定 app-package and app-activity 参数,你确定你的被测对象就是 com.example.test 和 MainActivity?

syl #2 · 2014年03月19日 Author

#1 楼 @qddegtya 嗯,确定 com.example.test 和 MainActivity 就是被测对象,因为在 ubuntu 上,运行同样的脚本,没有这个问题

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册