Pramod Sadaphal
unread,Jul 4, 2013, 6:46:23 AM7/4/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to appium-...@googlegroups.com
Hi,
Is there any method by which i can focus current activity on my android device which appium uses???
Getting logs,
info: Waiting for app's activity to become focused
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
error: App never showed up as active. appActivity: com.x.LoginActivity != com.x.LauncherActivity
error: Failed to start an Appium session, err was: Error: App never showed up as
active. appActivity: com.x.LoginActivity != com.x.LauncherActivity
....
Consider following strange scenario which I tried,
1. In desired capabilities I specified app-package to my package name say com.apppackage
2. Also specified launcher activity in app-activity say LauncherActivity
3. I ran my test case(on android device), and this launched my application. But my next code failed(finding element, clicking element).
4. Then I saw logs which were like,
info: Waiting for app's activity to become focused
info: Getting focused package and activity
info: Getting focused package and activity
info: Getting focused package and activity
5. Then I thought my app-activity name which I passed in code may be wrong.
6. I changed app-activity name in my code to LoginActivity as this activity name showed to me in log
7. I ran the test case, this time my app not launched, test case failed
8. Then I did some stupid job, this time I specified my app-activity name in code as LoginActivity
9. Launched my app manually
10. Ran my testcase, and its passed!!!!
So, is there any way to focus on my current activity??? By which I can use app-activity as LauncherActivity in my code and then focus on current activity,here LoginActivity now, and execute my further code.
thanks,
Pramod