Can we automate Fire TV using Appium


#1

My company is asking me to automate Fire TV . If it is not possible on Appium then use espresso.

Please help me out of this.


#2

What have you tried so far?


#3

Hi Afwang,

I am able to launch the application from appium.
only one issue : UIAUTOMATOR is not working on Fire OS version 5.0.5.1(537175520)

Regards
Jitu Kumar Patel


#4

Can you paste a copy of your Appium logs? You can paste a copy of your logs with Github Gist or Pastebin.

Can you also post the Android API level of your device? Connect your TV with adb, and then run adb shell getprop ro.build.version.sdk. Uiautomator should be available for devices running API 17 and newer; older devices have to fall back to using Selendroid.

It’s also possible that Amazon might have heavily altered their version of Android and stripped out Uiautomator. I hope they don’t do that, though, because that’s just a waste of resources for no practical benefit.


#5

C:\Users\jitu.patel>adb shell getprop ro.build.version.sdk
22


#6

The logs look like you’re successfully automating the app, but your test code might not be doing what you want it to do?

Can you paste an excerpt of your test code and explain what you want your code to do? I’m guessing you’re looking for some text called “Live TV”, but that text was not found.


#7

I am able automate the device.

To get the resource id of the elements we are using UIAUTOMATOR which is present inside tools folder of sdk.

UIAUTOMATOR is not able to take the screenshot.


#8

So i am taking the page source and taking the resource id


#9

I’m still not sure what you’re trying to do exactly, but if you want to take a screenshot, you can use adb and your device’s shell to help you grab a screenshot: http://developer.android.com/tools/help/shell.html#screencap However, since you’re using Appium, you also have the option to take a screenshot using the getScreenshotAs method.

It also sounds like you’re trying to retrieve a copy of the XML page source as a separate problem. You can use uiautomator’s (accessed through the device’s shell) dump subcommand to get an output of the UI in XML representation, but you have a better option through Appium by using the getPageSource method.


#10

Hi afwang,

Please find the screenshot.

Problem: I need to fetch the fire TV UI on the UIAUTOMATOR screen but it is giving error: Error taking device screenshot : null

Regards
Jitu


#11

For that, I’m not too sure about. Try checking the logcat logs to see if they provide any hint to what’s going on when you take a UI snapshot. Alternatively, you can also try using adb shell screencap to try manually retrieving a screenshot.


#12

Its working fine with me now I am able to launch the UI automator


#13

@Jitu1888 : HI Jitu. Were you successfully able to automate the fire tv app. If so can you please share the steps you followed and challenges you faced. Thanks!


#14

@Jitu1888 Immediate help would be appreciated.


#15

In some OS version uiautomator was not working. Its similar to Android Phone Automation


#16

Hi I can help you out .Currently I am working on Fire TV only


#17

Can you guide me how to resolve “uiautomator” issue on Amazon fire stick?


#18

Hi

Did you automate using Appium? Is it the same way as Appium is used for mobile automation?


#19

I was able to do the firestick automation of an app successfully. If you want to know the steps please let me know.


#20

Would be great if you can post the steps @jaym