I have to automate tests for an iOS hybrid app. The app is written using ionic framework. I have found the Xpath element using Safari Develop tool. And I know that the xpath is correct. And I still get this error:
org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: Locator map:
- native content: "By.all({By.xpath: //div[@class='nav-bar-block'][@nav-bar='active']/ion-header-bar/div/span/button})"
- html content: "by id or name "appMenuButton""
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.47.1', revision: 'unknown', time: '2015-07-30 11:02:44'
System info: host: 'clj-mb-133', ip: '169.254.89.27', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.2', java.version: '1.8.0_65'
Driver info: driver.version: unknown
I am searching for the element with:
@iOSFindAll({@iOSFindBy(xpath = "//div[@class='nav-bar-block'][@nav-bar='active']/ion-header-bar/div/span/button";})
Am I doing something wrong? Is the xpath not working for hybrid apps?
Appium: Version 1.4.13 (Draco)
OS: Mac OS X El Capitan 10.11.2