Broadcasting / Listening for intents on Android

532 views
Skip to first unread message

Jerry Belton

unread,
Jul 11, 2014, 1:24:23 PM7/11/14
to appium-...@googlegroups.com
Hello, I'm very new to Appium, and I'm trying to figure out how I can do some non-UI oriented tasks using Appium.

I'm testing a native android application that has some UI elements that I know Appium can manipulate. The app has other features that the user cannot manipulate directly; some actions require a message from a server, for example. In other situations, the app displays things/pictures on the screen that don't have any real form of identification; short of taking a screenshot and analyzing the image, there's no way that I can determine what image is being displayed by analyzing window elements.

Previously, we worked around this by having our test app send and receive intents to our target app. I see that Appium allows me to launch an activity or broadcast an intent right at the start of the test, but am I able to do so mid-test? And am I able to listen for intents?

In our previous test framework, we could also read the adb logcat for specific messages, and launch activities with adb commands. But it appears that Appium does not allow this? -- at least remotely. Our devices will most likely not be on the same computer as the tests themselves.

I'm testing on Android 4.4 devices with Appium 1.2, and I'm using the python client. I believe we want to stick with the UIautomator version of Appium. Any assistance or suggestions you have would be much appreciated, thanks!

bootstrap online

unread,
Jul 11, 2014, 1:35:23 PM7/11/14
to Jerry Belton, appium-...@googlegroups.com
On Fri, Jul 11, 2014 at 1:24 PM, Jerry Belton <jerry....@gmail.com> wrote:
> I see that Appium allows me to launch an activity or broadcast an intent
> right at the start of the test, but am I able to do so mid-test?

Activity launching will be added in 1.3. You could open an enhancement
request for intent broadcasting.
https://github.com/appium/appium/issues/2969

Jerry Belton

unread,
Jul 23, 2014, 4:40:32 PM7/23/14
to appium-...@googlegroups.com, jerry....@gmail.com
Ok I think that will solve most of my problems. I think we'll be able to work around intent broadcasting, but I'll open an enhancement request if not.

Thanks

bootstrap online

unread,
Jul 23, 2014, 4:51:44 PM7/23/14
to Jerry Belton, appium-...@googlegroups.com
intent broadcast is scheduled for v1.3.
https://github.com/appium/appium/issues/3172
> --
> http://appium.io
> ---
> You received this message because you are subscribed to the Google Groups
> "Appium-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to appium-discus...@googlegroups.com.
> Visit this group at http://groups.google.com/group/appium-discuss.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages