I am back to this topic. I am typing the Control UI guide, so I give AutoInput another chance to prove itself. But as expected, It failed to impress me again. After using Control UI for 9 months, Autoinput is too awkward to use. Selecting each element require us to go back thru Automagic for each action. Can't imagine how long I should spend to create a functional flow. But there is one thing It can do (that Automagic can't yet). It is about this thread topic too, the UI element list.
Input Dialog with duplicate label
I create a Input dialog multiple choice, have 5 elements. There are two elements have the same label : "hello
". Then I use Autoinput to select the second hello
(4th element). After selecting and go back to Automagic, at the Select Element Field, Autoinput give me 4 choices. (before I choose Click event)
, Element Text
and Element Center Point (x,y)
already available in Automagic. But that Element number 4 in list 'android:id/select_dialog_listview'
is the one doesn't exist in Automagic. Using Autoinput I can select the second 'hello' from the list, by simply selecting Element number 4 from the select_dialog_listview
I tried to look more in the configuration.
Autoinput has Field Type : Text, Id, Focus, List, and Point. Text, Id, Point
already available in Automagic. Focus
available in some element and can be changed manually after pasting the script. But we don't have Field Type List
(UI element list) in Automagic. It is because Autoinput has it, that's why it can pick Field Id 4
, which is to select 4th element from the listview. The right side is the result after I show up available variables from Autoinput.
Automagic Control UI
I tried the same thing in Automagic, this is the result.
From middle one, if I tap on the 4th element (second 'hello'), then it will pop up choices as shown on the left; where we have click(pattern)
. But we don't have clickListId(listviewId, index)
>>> I made up the name for example only. Using check() or click() works the same for this Input dialog.
For the listview, I can see a bigger rectangle covering the whole list. If I tap on the narrow spaces at the top or bottom, it will pop up choices as shown on the right. There I can find clickById("android:id/select_dialog_listview")
. But if I use this, nothing happen. I assume we can use clickById("android:id/text4")
, but that doesn't work. AFAIK, Id text1
is provided by the app UI element Id, not from Automagic. (well, in this case, the Input Dialog is from Automagic itself).
Because of this limitation, I can't select the second "hello" (4th element)
. Anytime I have duplicate label, I can't select or interact with the second one. If I use click("hello")
, it will only select the first hello it encounter from top right of the screen. If I use clickById("android:id/text1")
, it also only select the 1st element (even if it is not "hello"). If I use click(540, 1109)
, I doomed myself to a logic flaw. Because if by any chances the 1st to 3rd element now have longer text and covering more spaces, the click(x,y) won't work anymore. Worse is it can click the wrong element, causing havoc. Click(x,y) also doesn't work anymore if I change my phone UI dpi, causing the element size to contract or expand.
So the only solution if we can have clickListid(listviewId, index)
. In this case
Code: Select all
clickListId("android:id/select_dialog_listview", 3); //choose index 3 (4th element) from list Id "select_dialog_listview"
Of course, this doesn't limited to click only, it also expand to the other function such as longclick, check, getText and etc.
Hope this is clear enough to implement it when you have the time to look at it.
Thank & Regards,