Select item in Android list

Select item in Android list

Home Forums Ask Expert Select item in Android list

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32443
    Kirill Bulatnikov
    Participant

      Hello Marco. Thanks for using ZAPTEST.

      To perform this action you may create some virtual object, let’s call it “Language”. Prior to perform scrolling you need to set the property “Text” of this object to the value from datatable (or you can hard-code it)
      [i]
      Application(“Application”).View(“View”).Object(“Language”).SetProperty “Text”, DatatableValue(“A”)[/i]

      And in the next step apply “ScrollTo” method to this object

      Application(“Application”).View(“View”).Object(“Language”).ScrollTo

      Thus ZAPTEST will scroll the list until it find the object with text you need (if it’s exists, otherwise the step will report failure).

      Hope that helps.

      Thanks.
      Kirill,
      ZAPTEST Team.

      #32464
      Marco Malziotti
      Participant

        Thank
        All works fine if “A” is below in list, but if “A” is above ScroolTo function scrool list in bottom and not find “A”.
        In posted screenshot I want find “+380” prefix thath is present above selected “+39”; but ScrollTo scroll bottom.
        Regards.

        Marco Malziotti

        Attachments:
        #32465
        Sergey ZAP
        Keymaster

          Hello Marco!
          If I get it correct, this list does not open with top items, but rather random.
          In you case you can first scroll it up to the very top, and then scroll down to the desired item.
          Example:
          Application(“Application”).View(“View”).Object(“top_item”).ScrollTo 80
          Application(“Application”).View(“View”).Object(“item_to_select”).ScrollTo

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.

        Virtual Expert

        ZAPTEST

        ZAPTEST Logo