Here I would like to get the ball rolling on a discussion about the use of rokudev/automated-channel-testing suite as a template for creation of automated UI tests for Roku devices.
I have been trying to automate some test scenarios (user stories) on Roku device (both navigation and verification of certain app behaviour) and for this purpose downloaded rokudev/automated-channel-testing suite from git which uses API calls to interact with Roku device.
While experimenting with this suite I was able to use functions like web_driver.press_btn(button) to navigate around the app and functions like web_driver.verify_is_screen_loaded({"elementData": [{ "using": "text","value": “some value(s)”}]}) to find some elements (or not find as may be the case) on the current screen.
For example when running the function above, if an element with text “some value(s)” is discovered the script would receive API response True from Roku device.
According to the Roku WebDriver API documentation when finding some elements in this way, one should be able to use “text”, “tags” and “attributes” or any combination of these as a part of API call to find the element (or child of a parent containing these parameters) one is looking for.
While I have had some success finding elements using “text” and “tag” I was less successful when trying to use attribute when looking for elements
So, for example: web_driver.verify_is_screen_loaded({"elementData": [{"using": "text", "value": "Home"}], "parentData": [{"using": "tag", "value": "Button"}]}) will find a label with text “Home” which is situated/nested in an element of the type “Button” i.e. it would find “Button” with text “Home” in it,:
However, web_driver.verify_is_screen_loaded({"elementData": [{"using": "text", "value": "Home"}, {"using": "attr","attribute": "color", "value": "colorValue"}]}) will not find anything even though I know for sure that the element with text “Home” and with colour value “colorValue” does exist (API request would return False)
I would really appreciate any help help with this issue?
Also, has anybody been able to “find” playback element or way to read it’s state (play, stop, FF etc)