I am currently working on Native APP. Here i have a spinner and i want script to wait till that is disappeared.
But in the source code i am not able to find XPATH for the spinner to use the below code.
FluentWait wait = new WebDriverWait(getDriver(), 150);//Integer.parseInt(Constants.getProperty(“pagefluentWait”))
wait.withTimeout(150, TimeUnit.SECONDS).pollingEvery(2, TimeUnit.SECONDS)
.ignoring(NoSuchElementException.class);
wait.withMessage(“APP ERROR :: Waited 150 secs for load image to no longer be visible.”);
wait.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(“XPATH”)));
Currently i am using “//UIAActivityIndicator[@name=‘In progress’]” as XPATH as UIAActivityIndicator gives the status of the DOM whether fully loaded. But this is not efficient.
Is there any work around to pause my script till the spinner is disappeared.