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
51 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

Update is installed but status is in pending on App Center. Since sync is alreday called , it won't rollback automatically and also not updating to newer version. The app crashes on startup everytime.

So how to rollback or update to new code push bundle version in this case ?

Here is the sample code:

componentDidMount() { 
codePush.sync(codePushOptions,(status) => {  
switch (status) {    
case codePush.SyncStatus.CHECKING_FOR_UPDATE:
//console.log("Checking for updates.");
break;  
case codePush.SyncStatus.DOWNLOADING_PACKAGE:
//console.log("Downloading package.");
break;   
case codePush.SyncStatus.INSTALLING_UPDATE:
//console.log("Installing update.");
break;  
case codePush.SyncStatus.UP_TO_DATE:
break;  
case codePush.SyncStatus.UPDATE_INSTALLED:         
break;
}
})
throw new Error();
}

Note : I have thrown error to check working of auto rollback.

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
...