0

In order to shorcut and go directly to the current activity page of Android I must first find the activity name, if it is a fragment I try to get the closest activity as possible. I use a few commands to find this info, like "adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'" or "adb shell dumpsys activity top". Unfortunately it seems that "adb shell uiautomator dump" has only the package name of the current activity in the xml file, so it is not useful. Is that possible for Culebra to record the activity name of the current activity and generate it's associated code when it is an activity and not a fragment, something like device.startActivity(component='...') ? This would be very helpful and will permit the play back of the generated script directly from the activity.

AbrtFus
  • 29
  • 7

1 Answers1

1

I think your idea may be very helpful to others so I decided to add this functionality to culebra v 10.3.4.

The context menu, now includes Generates a startActivity()

enter image description here

which generates a line like this in the output script (considering that in this example Calculator was the Activity on top of the stack)

device.startActivity('com.android.calculator2/.Calculator')
Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
  • wow that's amazing, when I started using AndroidViewClient for the first time, finding the activity name was not trivial at all. This feature exists on all famous recorder, for example iMacros for the browser, thanks alot for you help. – AbrtFus May 05 '15 at 03:57
  • I'm glad to hear you find it useful. I would be interested in short user stories describing **AndroidViewClient/culebra** uses that can be published in the blog or wiki. I think it became a very powerful tool and everybody is using it in a very different way that help solves particular problems. Your contribution was really helpful and now other people can enjoy it. Thanks. – Diego Torres Milano May 05 '15 at 04:46