Can any one help me in getting the list of running process in Android using Selendroid?
Asked
Active
Viewed 321 times
0
-
Please add some more specific description to your question ! – Rahul Gupta Jul 17 '14 at 04:45
-
I need to test an application on android device. Here what i need to test is, I have a close button in my application and when i click on that button it close the application and the respective process gets killed. Now i am able to click on close button but i don't know how to check the list of process running in android using Selendroid??To validate weather the process is running or not? – Avinash Jul 18 '14 at 10:16
1 Answers
0
You can do that using ADB connection:
driver.getAdbConnection().executeShellCommand("ps > file");
driver.getAdbConnection().executeShellCommand("pull file localfile");

Son
- 960
- 2
- 14
- 25
-
Thanks for your answer... I am able to generate the file using ps command but i am unable to copy the file using the above given command driver.getAdbConnection().executeShellCommand("pull file localfile")... It throws system/bin/sh.pull not found..Can you please help me in copying the file from device to PC using selendroid? – Avinash Jul 18 '14 at 10:27
-
I remember i have problem with that. I think i used for that native ADB in java. You should look here: http://stackoverflow.com/questions/20922600/execute-adb-command-from-java-program – Son Jul 18 '14 at 11:30