I have an element whose value changes dynamically. This is the following:
"Pay 13.61"
I want to save the element 13.61 in a string and compare with 0.
This is how the appium structure looks like: enter image description here
I want to extract the value of pay. This is what I did:
String amt = wait.until(
ExpectedConditions.presenceOfElementLocated(By.xpath("//*[@text='Pay '+%s]"))).getText();
logger.info(amt);
logger.info("Cash Pay succeeded!");
Its not able to find the element, can anyone please help. Thanks. :)
//*[starts-with(text(),'Pay ')]?