'PageFactory is returning old values
Project - mobile automation, tools - appium, pagefactory I have an field which returns Account balance for logged in user. My test checks for new balance after successful transaction.
to assert amount calcualtion I am storing balanceBeforeTransaction and balanceAfterTransaction
@AndroidFindBy(xpath="//*[contains(@text,\'balance\')]")
public WebElement balance;
balanceBeforeTransaction = balance.getText();
transaction()
balanceAfterTransaction = balance.getText();
My transaction is succesfull and I can see new balance in mobile app but my code is returning same (old) value for both the fields i.e balanceBeforeTransaction and balanceAfterTransaction. Not sure why it is not picking latest value.
Note: I havent used @CahceLookup, If pagefactory uses it by default then how can I disable it
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
