Appium 无法测试 iOS 应用程序 "The URL '/' did not map to a valid resource"

Appium can not test iOS Application "The URL '/' did not map to a valid resource"

您好,我正在尝试使用 Appium 测试 iOS 应用程序。当我尝试打开此 link http://127.0.0.1:4723/

时,我在浏览器中收到以下消息

"The URL '/' did not map to a valid resource"

更多信息: Appium 版本 1.5.3

Appium 就像一个托管您的 iOS 应用程序的服务器。您可以在 java 或 java 脚本中编写测试我使用 intern Runner 并且 intern.js 的配置在

tunnel: 'NullTunnel',
tunnelOptions: {
    hostname: 'localhost',
    port: 4444
},

'capabilities': {
    'selenium-version': '2.48.0',
    'idle-timeout': 60,
    'defaulTimeout':60,
    'chromeOptions': {'args':['allow-ra-in-dev-mode']}
},    

'environments': [
    {browserName: 'chrome'},

],

然后你可以在iOSTest.js

中编写你自己的iOS测试
'use strict';

define([
'intern!object',
'intern/chai!assert',
'intern/dojo/node!underscore'],
function(registerSuite,assert,_) {


//set server configurations
registerSuite({
    'name': 'iOS CoApp Testing',

    'setup': function() {
    },

    'teardown': function() {
        // executes after suite ends;
        // can also be called `after` instead of `teardown`
    },

    'beforeEach': function(test) {

    },

    'afterEach': function(test) {
        // executes after each test
    },

    'simple test': function() {

     // it finds text field and insert 124 in it               
          .findByXpath
          ("//UIAApplication[1]/UIAWindow[1]/UIATextField[1]")
          .click()
          .pressKeys('124')
          .end()

    //it finds Button and clicks it              
         .findByXpath
          ("//UIAApplication[1]/UIAWindow[1]/UIAButton[1]")
          .click()
          .end()



        }
    });
});