I am trying to get the textview value of the linearlayaout having the checkbox with an (ischecked == true) property. Basically trying to get the text of all the items whose corresponding checkbox is checked.
->ListView
   -> LinearLayout
       -> Checkbox
       -> textview
       -> textview
I tried doing the following:
     UiScrollable citylistView = new UiScrollable(new UiSelector());
     listView.setMaxSearchSwipes(100);
     listView.scrollTextIntoView(name);
     listView.waitForExists(5000);
     UiObject listViewItem = listView.getChildByText(new UiSelector()
        .className(android.widget.CheckBox.ischecked(true));
     String cityName =listViewItem.gettext();
But this doesn't seem to work. I'd really appreciate if anyone could point out what I'm doing wrong. Thanks for your help!
                        
From what I can see is
is incorrect as that function is expected a string. I think you need to rewrite it like this.
If I am correct this should help with your solution, it would be useful for a screen shot of the section and the xml, be easier to know how it is directly laid out. Unfortunately I couldn't test this solution but I hope it helps.