mirror of
https://github.com/appium/appium.git
synced 2026-02-09 03:09:02 -06:00
Merge pull request #1836 from jlipps/master
make sure we don't send status objects back to appium#start (fix #1706)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
var IOS = require('./ios.js')
|
||||
, logger = require('../../server/logger.js').get('appium')
|
||||
, status = require("../../server/status.js")
|
||||
, _ = require('underscore');
|
||||
|
||||
var Safari = function (args) {
|
||||
@@ -58,9 +59,13 @@ Safari.prototype.navToLatestAvailableWebview = function (cb) {
|
||||
if (parseInt(this.iOSSDKVersion, 10) >= 7 && !this.udid) {
|
||||
logger.info("We're on iOS7 simulator: clicking apple button to get into a webview");
|
||||
this.findAndAct('xpath', '//window[2]/scrollview[1]/button[1]', 0, 'click', [], function (err, res) {
|
||||
if (this.checkSuccess(err, res, cb)) {
|
||||
navToView();
|
||||
if (err || res.status !== status.codes.Success.code) {
|
||||
var msg = "Could not successfully navigate to a working Safari " +
|
||||
"webview. Original error: " + (err ? err.message : "unknown");
|
||||
logger.error(msg);
|
||||
return cb(new Error(msg));
|
||||
}
|
||||
navToView();
|
||||
}.bind(this));
|
||||
} else {
|
||||
navToView();
|
||||
|
||||
Reference in New Issue
Block a user