Not able to Read text on the propgress dialouge with message as id

  1. the application which i am automating has propgress dialouge on each page with id as message
  2. in first page when i get the progress dialouge i am able to read the text on it.
  3. in the seconds i get the error saying element cannot be located but the id of the progress dialouge is still “message” kindly let me know if i am doing something wrong here

You can generally use explicit wait until the UI element is displayed on the page and then perform the necessary action

Here is the code for that:
wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.className(“android.widget.ImageButton”)));

Hi It did not work… any other way to do it? i have attached the pic and the screenshot of the app. kindly help.

Try using this
wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.xpath(//android.widget.textview[@Text = ‘Loading Event Data…’]"));