Hello guys,
I am currently automating my IOS native application on IOS Ipad2 simulator(IOS 7.1) using Appium java client liabrary.
Everything is working fine in my script except navigating to previous window.
I did try using following options:
1.element.sendkeys(Keys.ESCAPE)
2.Driver.navigate().back()
but neither worked on IOS.
I gone through 1 post in which appium_lib is used to achieve the same thing.But I believe appium_lib can only be used with Ruby bindings.
Can it be used using Java client bindings also?If yes then help me in using this with Java.
If the in-built back() does not work then consider coding your own back() function that clicks on whatever UI element in your AUT provides that function. In most iOS apps that element is the first element on the page, located at the top left of the top navbar. However, sometimes it may be a “Done” button, or there may not be any UI element to drive you back a screen at all because you’ve reach the main app dashboard / home screen.
@Christopher_Graham
We have UINavigationBar which contains back button,in inspector it is shown with visible property as “false” and hence when i try to tap on it,it gives me an error:“elementId 0 could not be tapped”
Ignore the fact your button’s visible property is false. Just try to click on it. I think you’ll find it works. Looking at my page XML shows visible=true where Appium.app Inspector shows the same element visible=false.
Note that you can try various actions against various UI elements directly in the Appium.app inspector to see if they will work before writing test code.
@Christopher_Graham
Thanks
After some investigation at our end it is found that problem is in our application source.Due to bug NavigationBar does not display properly,hence the problem.