Count all elements with the specific resource ID on the scrollable view



  • Here is the question. How can I count all the elements with the resource ID body_bubble on a scrollable view ? When I use the driver.findElements (By.id ("body_bubble")).size() method, it gets only the elements that are currently in view (visible on the screen).

    How can I find all the elements? I know that I can use something like new UiScrollable(new UiSelector()).scrollIntoView, but I can't wrap my head around it.

    Please help me out.

    enter image description here



  • In modern applications to gain performance not all the content is loaded at once. Option I would suggest is.

    Can you scroll to the bottom of the page in the start and then try to find the elements? That way you can be sure that all the elements were loaded.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2