Hi,
The else condition is not working in appium;only the if part gets executed. If the element is not found else condition should execute. Please provide the suggestion for using else.
Here is my code snippet:
if(driver.findElement(By.xpath("//android.widget.TextView[contains(@text,'Current Booking')]")).isDisplayed()){ driver.findElement(By.xpath("//android.widget.TextView[contains(@text,'Current Booking')]")).click();
}
else{
driver.closeApp();
}
created
Jul '16
last reply
Jan '19
- 4
replies
- 966
views
- 3
users