TestProject Forum
Powered by leading experts in the test automation community

Swipe Up to find TEXT

Hello…
I am on an Android App and have to scroll down a list with drawers with ‘Job Names’, where the Element identifier for each ‘Job Name’ is the same. The drawer are recycled with info in it.
I have to find a specific ‘Job Name’ (Drawer) down the list and have to scroll to it and then click it.
The ‘Job Name’ I am looking for isn’t in the same location in that list either, when I run this test…
I can’t use ‘scroll to element’ in this case.
Does somebody has a good solution to do this??

Thanks…

Hello @mblom.

There must be something unique about any of these elements, you will need this in order to identify them.
If you intend to swipe to an element and even click on successfully each time, you will need a way to locate it, even the element text is usually a part of the element.

Check the element’s attributes to see if you can find anything unique to it.

1 Like

Hi David,

All cells are the same, there is no way to differentiate those drawers with a unique identifier…
I would be great if there was a way to scroll to an element by text.

Thanks

Hi @mblom,
In case you can identify the element by text, i would suggest to use:

//*[text() = 'hello']

xpath with ‘Swipe to element’ Addon.

(notice that //*[text() = ‘{ElementText}’] will return all the elements with the certain text,
so it has to be unique.)

1 Like