iOS 7, Safari, Navigate().Back() can't find the element

439 views
Skip to first unread message

Sven S.

unread,
Nov 13, 2013, 6:57:40 AM11/13/13
to appium-...@googlegroups.com
Hi,
 
I tried to navigate back via
 
var cap = new DesiredCapabilities();
cap.SetCapability("version", "7.0");
cap.SetCapability("device", "iPhone Simulator");
cap.SetCapability("app", "Safari");
using (var driver = new RemoteWebDriver(new Uri("http://<ip>:4723/wd/hub"), cap))
{
   driver.Navigate().GoToUrl("http://www.google.com/");
   driver.Navigate().Back();
}
 
The Appium log says:
debug: Request received with params: {}
debug: Sending command to instruments: au.getElementByXpath('\/\/toolbar\/button[@name=\"Back\"]')
info: [INST] 2013-11-13 11:46:15 +0000 Default: Got new command 0 from instruments: au.getElementByXpath('\/\/toolbar\/button[@name=\"Back\"]')
info: [INSTSERVER] Socket data received (50 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":7,"value":null}
info: Responding to client with error: {"status":7,"value":{"message":"An element could not be located on the page using the given search
 
How can I solve this Problem?
 
rgds Sven
 
 

 

 

 

 

 

 

bootstrap online

unread,
Nov 13, 2013, 9:31:54 AM11/13/13
to Sven S., appium-...@googlegroups.com
This is how I find the back button for iOS 7.
https://github.com/appium/ruby_lib_ios/blob/master/lib/run.rb#L38
> --
> http://appium.io
> ---
> You received this message because you are subscribed to the Google Groups
> "Appium-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to appium-discus...@googlegroups.com.
> Visit this group at http://groups.google.com/group/appium-discuss.
> For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Lipps

unread,
Nov 13, 2013, 10:53:07 AM11/13/13
to bootstrap online, Sven S., appium-...@googlegroups.com
Using safari on ios7 will have certain limitations, including lacking the ability to interact with alerts and clicking the forward/backward buttons.

Sergio Neves Barros

unread,
Nov 15, 2013, 7:04:25 AM11/15/13
to appium-...@googlegroups.com
Maybe we could replace it with "window.history.back()" etc. so that it works, but just not by clicking on the back button for iOS 7.0 (and on real devices).

Sergio

Jonathan Lipps

unread,
Nov 15, 2013, 10:52:57 AM11/15/13
to Sergio Neves Barros, appium-...@googlegroups.com
yep, i'm working on refactoring some of this now

Reply all
Reply to author
Forward
0 new messages