I am trying to automate a scenario where there are some cards that are visible after horizontal scroll. Each card has an accessibility Id equal to cardholder name and at a time only one card is viewable. I am using below script to scroll to the specific card
but there is a problem. Whenever there is a scroll, an API call is made which takes sometime to load the card data. Above script works perfectly regarding scroll but doesn’t stop when the said card is reached. I suppose this problem is due to the reason that it takes sometime for data to load but the script can’t handle the wait. Hence, it assumes the card is not present. Is there any way we can add wait to AndroidUIAutomator script?
looks everything correct. not sure about only ‘instance(1)’ - this is second scrollable on your screen. if it has any id you can change it to ‘resourceIdMatches’.