I have a UITableView which contains about 50 elements. At any point only 6 of them are visible on screen. I want to select a cell which is not added to table view or say I need to select 25th item from the data list.
Now I am using this method for clicking a cell in tableview
wait.until(ExpectedConditions.visibilityOf(driver.findElementByAccessibilityId(element))).click();
But its not working as the 25th element is not added to the view yet. Please note that I am adding the accessibility identifier for the table view cell dynamically within the code.
How can I make this work?
***** Added more details******
I have the table view cell displaying two text views. Currency Short Name and Currency Long Name.
Consider the example
GBP
Great Britain Pounds
Now the accessibility Identifier for that tableview cell is set as GBP. Now I tried
driver.scrollTo("GBP") and driver.scrollTo("Great Britain Pounds")
Both didnt work. I am getting an error message
A element could not be located on the page using the Search parameter
Thanks.