top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Constructing complex UiSelectors in Android

+1 vote
48 views

I am trying to write a UiAutomator test case to check settings to see if Wi-Fi is enabled, and to turn it on if it is not.

The UI hierarchy for the Wi-Fi line in settings looks like:

LinearLayout (the entire Wi-Fi in settings)

--> (0) LinearLayout
----> ImageView (the Wi-Fi icon)
--> (1) LinearLayout
----> TextView ("Wi-Fi")
--> (2) Switch (the Wi-Fi toggle switch

My approach to identifying the correct switch is to find a switch where it's grandparent has a descendant text view containing the text "Wi-Fi".

There doesn't seem to be much information "out there" as to the grammar for constructing complex UiSelectors - can anyone point me in the right direction?

posted Jul 15, 2013 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

Similar Questions
0 votes

Have you even seen OutOfMemoryError in system server? If yes, how do you find the root case of OOM? Do you have any tools that help finding the root cause in production code or during development?

0 votes

In android-O, there is "app" folder in vendor partition.(/vendor/app)If app is in that folder and is ran, is that a vendor process?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...