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

Facebook Login
Site Registration
Print Preview

Constructing complex UiSelectors in Android

+1 vote

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
+1 vote

I live in a remote location with awful reception, and a friend suggested I should get a signal booster. I can connect to LTE if I force it in my phone's Hidden Menu (LG G5) but it functions basically at the same speed as HSPA, however when I visit a big city the 4G connection kicks in on its own and at very high speeds.

I found out that my phone carrier is using Band 3 for LTE which should mean that I need a 1800 Mhz signal booster which I found on ebay, but I'd really appreciate it if someone who actually knows this stuff could take a look and say if I'm right in my choice of this signal booster.

Included are screenshots of my Phone's LTE connection details as well as the item page of the signal booster I found.

+1 vote

I am using GsmCellLocation to get LAC and cell id for 3G network with below code :

mCid = gmsCellLocation.getCid() & 0xffff;
mLac = gmsCellLocation.getLac();

and is there any library or formula how to get/calculate the correct LAC and cell id for LTE network (4G) ?

Useful Links with Similar Problem
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.