My test consist of having a list of element. Clicking on the first one to open it then swipe right to left to access the next one and make sure that they are different.
On Android it's working perfectly but for some reason it seems that the driver doesn't refresh itself after swiping into the new page.
If i'm trying to access a text i keep on having the element from the first page even if i'm in the 2nd or 3rd element of the list
is there a sort of refresh page in Appium iOS ?
here is my code :
finding my title
driver.findElement(By.id("title_label"));
swiping
Dimension size = driver.manage().window().getSize();
driver.swipe(size.getWidth()-100, size.getHeight()/2, 100, size.getHeight()/2, 500);
then remake the find title function and even tough me screen is changing on my ipad and a can see the new title, in the code I still have the old one
any idea ?
Edit :
Just to be clear if it wasn't. This is happening when swiping to a new page so the whole page is refreshing. It's not just a part of it or swiping inside an element of the same page.
driver.getPageSource()after the swipe? Perhaps there are two elements with id "title_label" first being the original one you already found? - LassefindElement(By.xpath("//UIAElement[@name='title_label'][@attribute='true']"));Otherwise try to fix the app UI behavior. - Lasse