Editions Tagged With 'Android'

120
120Setting Accelerometer Data for the Android Emulator
Little sensors called accelerometers are a key component of mobile devices today, enabling all sorts of interesting applications. In this edition we take a look at how to use Appium to inject accelerometer values into an Android virtual device, so you can emulate the real-world behavior of users and test apps that depend on changing accelerometer values.
Published Jul 22, 2020
114
114How (And Why) To Create a Custom Expected Condition
When waiting for app state, you're not limited to the built-in expected conditions from the Appium client libraries. You can also create your own expected conditions, which neatly wrap up information about app-specific state, and potentially include helpful side effects as well. As a case study, we examine a particular custom expected condition I created for use with automation of the Zoom app, following an Automation Happy Hour.
Published Apr 29, 2020
113
113How to Automate the Zoom Video Meetings App
Taking the results of a recent Automation Happy Hour, we explore the Zoom app. How automatable is it? How can we reliably automate the process of joining a meeting? Turns out it's totally doable!
Published Apr 23, 2020
106
106Retrieving Status Bar Notifications for Android Devices
Getting the notifications that various apps can leave on your system is a challenging task. Thankfully, Appium has found a way to communicate with its helper app to retrieve these notifications for you and return them to your test script along with a ton of potentially quite-useful metadata.
Published Feb 19, 2020
97
97Capturing App Launch Metrics On Android
App launch time is a significant performance metric, since it defines a user's first experience of your app. Luckily, with a bit of hackery, this is easy to determine using Appium. Combined with the use of a device cloud service (in this article we explore AWS Device Farm), it's within the reach of most test teams to track app launch performance over time.
Published Nov 27, 2019
95
95The 'Android Data Matcher' Locator Strategy
Sometimes, it is impossible or inconvenient to find elements that have not yet been rendered by the Android UI subsystems. Using the Espresso driver, we have access to a special locator strategy that enables us to access elements which have data bound to them, even if the elements themselves are not yet visible.
Published Nov 13, 2019
93
93Managing Chromedriver for Android Chrome and Webview Testing
Appium uses Chromedriver to automate Android web and hybrid apps. Chromedriver is great, but it comes with its own wrinkles in terms of Chrome version support. In this edition, we take a look at four strategies for approaching these challenges.
Published Oct 30, 2019
87
87Working With Android 10
Android 10 comes with a few changes to the permissions model that might cause issues for app automation, especially of older apps. In this article we take a look at how to work around these changes and keep the automation rolling.
Published Sep 18, 2019
83
83Speeding Up Android Screenshots With MJPEG Servers
The best way to speed up Android screenshot retrieval is to read screenshots from what is essentially a special type of video stream known as an MJPEG stream. In this article we show how to set up such a stream and tell Appium how to read from it.
Published Aug 21, 2019
73
73Working with Multile Webviews in Android Hybrid Apps
Some Android apps are built with multiple webviews, and they're a bit tricky to work with because they don't show up in the context list as you'd expect. Thankfully there's an easy workaround which enables automation of any number of webviews.
Published Jun 12, 2019
72
72Simulating Slow Internet Connections on Android Emulators with Appium
Learn how to control the network connection quality of Android emulators from an Appium test script.
Published Jun 5, 2019
64
64Validating Android Toast Messages
A common app notification method on the Android platform utilizes 'toast' messages, which are displayed for a brief period of time and then disappear. Using methods available in Appium's Espresso driver, in conjunction with Explicit Waits, it's possible to verify the behavior of toast messages within your app.
Published Apr 10, 2019
63
63Capturing Android Emulator Network Traffic with Appium
Using a Proxy, we can capture the exact network packets sent from an Android emulator and make assertions on their contents or timing. We can even modify the responses at will!
Published Apr 3, 2019
56
56What Appium Users Need to Know about Android Activities and Intents
What are Activities and Intents? How they shape Android app design and how we can improve our test suites by being aware of them.
Published Feb 13, 2019
53
53Accessing Android Logcat Logs with Appium
Android devices record detailed system logs, commonly referred to as 'logcat' logs. These logs sometimes contain information pertinent to tests, and can be easily read and saved from remote devices through the various Appium clients.
Published Jan 23, 2019
51
51Calling Methods Inside Your App From Appium
Appium, combined with the power of Espresso, can finally break its way out of the black box testing model. Whether this is something you want to do is of course up to you, but using the mobile: backdoor method, you can trigger app-internal methods with arbitrary parameters.
Published Jan 9, 2019
50
50Special Capabilities for Speeding up Android Test Initialization
Some new desired capabilities have been added, which when appropriately used can greatly increase the overall time it takes to run a test suite on Android devices.
Published Jan 2, 2019
48
48Flashing Elements On Screen
Add some sparkle to your Appium test by making elements flash! Not only a party trick, this can be a useful technique for debugging your test scripts to visually verify that you've got a handle on the elements you think you do!
Published Dec 19, 2018
46
46Sending Arbitrary Keystrokes With The Actions API
The W3C Actions API is about more than building complex touch gestures. It extends to full control over the keyboard (virtual or real), and allows for fine-grained control of keystrokes. Using this portion of the Actions API, you can trigger key input in your app without having to first find an element and then use `sendKeys` on it specifically.
Published Dec 5, 2018
42
42Simulating Incoming Phone Calls On Android
Just as you can generate artificial text messages to an Android emulator, so you can also convince an emulator to believe it's receiving a phone call! Appium has a simple API for triggering incoming phone calls from arbitrary numbers, which can be useful for a variety of reasons, not least of which is making sure your app stays functional during a call.
Published Nov 7, 2018
38
38Capturing Browser Errors and Logs in Android Web/Hybrid Apps
When using Chrome on Android, or Chrome-backed webviews, it is possible to retrieve logs written by web applications (or hybrid applications) to the browser console. Retrieving these logs is useful for a number of reasons, from observing app state to saving app-internal logs along with test artifacts.
Published Oct 10, 2018
34
34Simulating Hardware Keys And Key Events On Android
Appium automation doesn't necessarily stop at the edge of the screen. Your Android device has hardware buttons (power, volume control, etc...), and Appium gives you the ability to automate these as well, using a generic KeyEvent interface from Android.
Published Sep 12, 2018
18
18Using Espresso With Appium
Espresso and Appium?! That's right, you can access the power and reliability of Google's flagship Android automation technology from within Appium, retaining the ability to write WebDriver-compatible scripts in any programming language.
Published May 23, 2018
11
11Simulating SMS Messages on Android
Mobile apps have the possibility of integrating with the core communications functions of mobile devices. For example, they can send or respond to SMS messages. When testing with Appium it's possible to generate SMS messages that show up on Android Emulators, that can be used as part of an app verification flow.
Published Mar 28, 2018
9
9Testing Android App Upgrades
It's important to test that user data and user experiences are not broken due to changes between app version upgrades. Appium comes with some built-in app management commands that make it possible to test how your app behaves across versions, all within the context of one Appium session.
Published Mar 14, 2018
5
5Performance Testing of Android Apps
Functional testing is not the only kind of testing that Appium supports. As a pure automation library, Appium can also be used in the service of performance testing. In this edition we take a look at an example of performance testing on Android, namely how to track memory usage over time and make assertions about it.
Published Feb 14, 2018
3
3Running arbitrary ADB commands via Appium
For a long time, it was not possible to run arbitrary ADB commands with Appium. Now it is! Here's how to remove the bumpers and get dangerous with ADB.
Published Jan 31, 2018
2
2Seeding an Android device with test photos
In this edition we explore the Android equivalent to our previous tip: how to add your own photos to the device so they can be available to media apps.
Published Jan 24, 2018