2020-08-20: Automating Posting Videos to Instagram with BrowserStack's Appium Automation Framework
Recently, I have been working on enhancing an old project, WhatDidItLookLike. This project focuses on summarizing a URI by generating an animated GIF of what it looked like over the years. Users send in requests by simply tweeting out #whatdiditlooklike [URI].
.@acnwala, https://t.co/ZJweNxx5EC (CNN - Breaking News, Latest News and Vi...) has been posted: https://t.co/NCOiZZr2Yc
— whatdiditlooklike (@_wdill) October 26, 2018
A screenshot for the first memento of each year is captured for the requested URI. These screenshots are then combined and used to generate a GIF. Currently, the GIF is posted to Tumblr and it can be viewed at whatdiditlooklike.mementoweb.org.
My goal was to share this GIF on Instagram. Instagram does not support GIFs so a workaround is to post a video instead. Using Instagram on a browser with a mobile device user-agent allows the user to post pictures only. The browser approach didn’t work for me as I needed to post a video. It seems that Instagram only allowed posting videos through a mobile app so I looked at a few online android emulators and here’s what I found:
- ApkOnline: Free to use, only available for Android platform.
- Appetize.io: Paid but has a reasonable trial version (1 concurrent session and 100mins/month). Available for both iOS and Android platforms.
- BrowserStack: Free plan includes visual testing and app automation. A free 30min trial for live app testing is also provided to new users. Available for iOS, Android, Windows, and MacOS platforms.
- RunThatApp: Paid (0.05/min). Available for both iOS and Android platforms.
Instagram app installed on ApkOnline emulator crashes upon launch |
- Appium: This is an open source tool that can be used on both Android and iOS devices. Appium focuses on black box testing which means that the developer is not required to know how the code works in order to write tests. The client libraries are available for Python, Java, Ruby, JavaScript, PHP, and C#.
- Espresso: This tool is developed by Google and is designed for mainly functional UI testing Android apps. Espresso is meant to be used for white box testing which means that it is required for the developer writing the tests to know the code of the application and how it runs.
- XCUI: This is a tool by Apple that helps to automate iOS and OS X testing. XCUI may be used for black box testing.
Google Pixel 3 emulated using the Android Emulator |
Screenshot and XML content from the emulator captured and displayed on UI Automator Viewer |
Summary of the screens visited to post to Instagram using Appium |
Comments
Post a Comment