Hi,
I am new to using Appium so please excuse my ‘newbie’ question.
Currently I am trying to automated a type of spread sheet GUI on iOS for an iPad application that me and my team are developing. This spread sheet is a CollectionViews() object which it identifiable using the the following xpath expression: “//UIAApplication[1]/UIAWindow[1]/UIACollectionView[1]”.
What I want to do is to get the cell count of this CollectionView so I tried messing around with the following code, but I have had no luck coming to a solution.
Also, if there is a way to extract/interact with CollectionViews and Cells directly using the Appium API that would be preferred rather than having to use the .executeScript method.
WebElement e = driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIACollectionView[1]"));
int x = (Integer) ((JavascriptExecutor) driver).executeScript("arguments[0].cells().length;", e);
Thanks in advance for your help.
Andrew