Hello, shani
So it depends on how your project is structured.
What you need there is some kind of a refresh of the page that you are inspecting after you push that button.
In my case, every screen has a particular pageobject class.
So, a method that I will use to do that refresh would be something like this:
public DashboardPage moreInformation() {
WebElement moreInformationButton = driver.findElement(By.name("WEITERE INFORMATIONEN"));
moreInformationButton.click();
return new DashboardPage(driver);
}
So, what this method does, is this:
Searches for “Weitere Informationen” element, then clicks on it, then returns the same page that I am in “DashboardPage(driver)” and calls for the driver again. So its kind of a refresh on the page.
In my case, after this refresh, more elements show up so I will be able to identify them. Otherwise, it won’t work.
So, in my opinion, if your project structure is not very reliable, you should take some time researching about “Appium project structure”. You can find plenty tutorials on the internet on how it should be correctly done.
I hope it helped!