I have used isDisplayed(),IsEnabled() method to identify Element in the page but its not identifying, Its giving error like this
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters.
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘Mohammeds-Mini’, ip: ‘192.168.225.192’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘11.4’, java.version: ‘16.0.2’
Driver info: io.appium.java_client.ios.IOSDriver
used methods:
1)if ( driver .findElement(By. xpath ("//XCUIElementTypeImage[@name=“refresh”]")).isEnabled()) {
System. out .println(“Displayed”);
} else {
System. out .println(" Not Displayed");
}
2)if ( driver .findElement(By. xpath ("//XCUIElementTypeImage[@name=“refresh”]")).isDisplayed()) {
System. out .println(“Displayed”);
} else {
System. out .println(" Not Displayed");
}
-
boolean displayed = element.isEnabled();
if (displayed= true ) {
System. out .println(“Displayed”);
} else {
System. out .println(" Not Displayed");
}
-
boolean displayed = element.isDisplayed();
if (displayed= true ) {
System. out .println(“Displayed”);
} else {
System. out .println(" Not Displayed");
}