While running protractor script with appium : No e

2019-02-16 00:28发布

I'm using Ipad Air simulator, appium and protractor in order to automate my tests for an Angular JS site but the test couldn't be passed successfully, it tells me that No element found using locator. I'm sure that the xpath it's the same generated by Appium.

This is my config file

​exports.config = {
  allScriptsTimeout: 600000,
  seleniumAddress: 'http://0.0.0.0:4723/wd/hub',

  specs: [
    'testsuite/test3.js'
  ],

  capabilities: {
    browserName: 'safari',
   'appium-version': '1.4.13',
    platformName: 'iOS',
    platformVersion: '9.3',
    deviceName: 'iPad Air',
    'autoWebview' : true         
},

  chromeOnly: false,

  baseUrl: 'http://10.0.22.82:8080/jws/fetablet',

  framework:[
    'jasmine'
  ],

jasmineNodeOpts: { 

    defaultTimeoutInterval:1000000
}         
};

I want to automate my tests for an Angular JS site using Ipad Air simulator, appium and protractor but the problem that the test couldn't be passed successfully, it tells me that element couldn't be located and i'm sure about the xpath it's the same generated by appium.

My test3.js file contain :

"use strict";
var wd = require("wd");
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");

chai.use(chaiAsPromised);

var expect = chai.expect;

chai.should();
chaiAsPromised.transferPromiseness = wd.transferPromiseness;

describe('my app', function() {

it('should make the login test',function()  {

var desired = {
browserName: 'safari',
platformName:'iOS',
name:"This is an example for login test"
}
browser.ignoresynchronization=true;
browser.get("http://10.0.22.82:8080/jws/fetablet");


 browser.findElement(by.xpath("//UIAApplication[1]/UIAWindow[2]/UIAScrollView[1]/UIAScrollView[1]/UIAWebView[1]/UIATextField[1]")).sendKeys("RET02");


});

});

I have a problem saying that : "No element found using locator : by.xpath("//UIAApplication[1]/UIAWindow[2]/UIAScrollView[1]/UIAScrollView[1]/UIA‌​WebView[1]/UIATextField[1]"))"

This is the appium log file :

​[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute {"script":"return window.location.href;","args":[]}
[MJSONWP] Calling AppiumDriver.execute() with args: ["return window.location.href;",[],"04efb027-9ff4-4743-8280-744365d0fab1"]​​
[debug] [iOS] Executing iOS command 'execute'
[debug] [RemoteDebugger] Executing 'exe​​cute_script' atom in default context
[debug] [RemoteDebugger] Sending javascript command (function(){return function...
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to remote debugger
[debug] [RemoteDebugger] Received applicationSentData response
​​[debug] [RemoteDebugger] Found data handler for response
[debug] [RemoteDebugger] Received data response from socket send: '{"status":0,"value":"http:/...'
[debug] [RemoteDebugger] Original command: sendJSCommand
[debug] [RemoteDebugger] Received result for atom 'execute_script' execution: "http://10.0.22.82:8080/jws/fetablet/"
[MJSONWP] Responding to client with driver.execute() result: "http://10.0.22.82:8080/jws/fetablet/"
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute 200 510 ms - 110 
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute_async {"script":"try { return (function (attempts, asyncCallback) {\n  var callback = function(args) {\n    setTimeout(function() {\n      asyncCallback(args);\n    }, 0);\n  };\n  var check = function(n) {\n    try {\n      if (window.getAllAngularTestabilities) {\n        callback({ver: 2});\n      } else if (window.angular && window.angular.resumeBootstrap) {\n        callback({ver: 1});\n      } else if (n < 1) {\n        if (window.angular) {\n          callback({message: 'angular never provided resumeBootstrap'});\n        } else {\n          callback({message: 'retries looking for angular exceeded'});\n        }\n      } else {\n        window.setTimeout(function() {check(n - 1);}, 1000);\n      }\n    } catch (e) {\n      callback({message: e});\n    }\n  };\n  check(attempts);\n}).apply(this, arguments); }\ncatch(e) { throw (e instanceof Error) ? e : new Error(e); }","args":[80]}
[MJSONWP] Calling AppiumDriver.executeAsync() with args: ["try { return (function (attempts, asyncCallback) {\n  var callback = function(args) {\n    setTimeout(function() {\n      asyncCallback(args);\n ...
[debug] [iOS] Executing iOS command 'executeAsync'
[debug] [iOS] Response url for executeAsync: http://0.0.0.0:4723/wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response
[debug] [RemoteDebugger] Executing 'execute_async_script' atom in default context
[debug] [RemoteDebugger] Sending javascript command (function(){return function...
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to remote debugger
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Found data handler for response
[debug] [RemoteDebugger] Received data response from socket send: '{"result":{"type":"undefine...'
[debug] [RemoteDebugger] Original command: sendJSCommand
[debug] [iOS] atom did not return yet, checking to see if we are blocked by an alert
[debug] [UIAuto] Sending command to instruments: au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:18:57 +0000 Debug: Got new command 13 from instruments: au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:18:57 +0000 Debug: evaluating au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:18:58 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-04-15 10:18:58 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-04-15 10:18:58 +0000 Debug: Running system command #14: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/hy/db81jfkn23x5jxsmdnk_d_8h0000gr/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [UIAuto] Socket data received (28 bytes)
[debug] [UIAuto] Got result from instruments: {"status":0,"value":false}
[debug] [iOS] No alert found.
[debug] [iOS] atom did not return yet, checking to see if we are blocked by an alert
[debug] [UIAuto] Sending command to instruments: au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:18:59 +0000 Debug: Got new command 14 from instruments: au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:18:59 +0000 Debug: evaluating au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:18:59 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-04-15 10:18:59 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-04-15 10:18:59 +0000 Debug: Running system command #15: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/hy/db81jfkn23x5jxsmdnk_d_8h0000gr/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [UIAuto] Socket data received (28 bytes)
[debug] [UIAuto] Got result from instruments: {"status":0,"value":false}
[debug] [iOS] No alert found.
[debug] [iOS] atom did not return yet, checking to see if we are blocked by an alert
[debug] [UIAuto] Sending command to instruments: au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:19:00 +0000 Debug: Got new command 15 from instruments: au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:19:00 +0000 Debug: evaluating au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:19:00 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-04-15 10:19:00 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-04-15 10:19:00 +0000 Debug: Running system command #16: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/hy/db81jfkn23x5jxsmdnk_d_8h0000gr/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [UIAuto] Socket data received (28 bytes)
[debug] [UIAuto] Got result from instruments: {"status":0,"value":false}
[debug] [iOS] No alert found.
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Got a blank data response from debugger
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Got a blank data response from debugger
[HTTP] <-- OPTIONS /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response 200 1 ms - 2 
[debug] [iOS] atom did not return yet, checking to see if we are blocked by an alert
[debug] [UIAuto] Sending command to instruments: au.alertIsPresent()
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response {"status":0,"value":{"ver":1}}
[MJSONWP] Calling AppiumDriver.receiveAsyncResponse() with args: [0,{"ver":1},"04efb027-9ff4-4743-8280-744365d0fab1"]
[debug] [iOS] Executing iOS command 'receiveAsyncResponse'
[debug] [iOS] Received async response: {"ver":1}
[MJSONWP] Responding to client with driver.receiveAsyncResponse() result: null
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response 200 3 ms - 76 
[debug] [Instruments] [INST] 2016-04-15 10:19:01 +0000 Debug: Got new command 16 from instruments: au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:19:01 +0000 Debug: evaluating au.alertIsPresent()
[debug] [Instruments] [INST] 2016-04-15 10:19:01 +0000 Debug: evaluation finished
[debug] [Instruments] [INST] 2016-04-15 10:19:01 +0000 Debug: responding with:
[debug] [Instruments] [INST] 2016-04-15 10:19:01 +0000 Debug: Running system command #17: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/hy/db81jfkn23x5jxsmdnk_d_8h0000gr/T/instruments_sock 2,{"status":0,"value":false}...
[debug] [UIAuto] Socket data received (28 bytes)
[debug] [UIAuto] Got result from instruments: {"status":0,"value":false}
[debug] [iOS] No alert found.
[MJSONWP] Responding to client with driver.executeAsync() result: {"ver":1}
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute_async 200 4832 ms - 81 
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute {"script":"return (function (trackOutstandingTimeouts) {\n    var ngMod = angular.module('protractorBaseModule_', []).\n        config(['$compileProvider', function($compileProvider) {\n          if ($compileProvider.debugInfoEnabled) {\n            $compileProvider.debugInfoEnabled(true);\n          }\n        }]);\n    if (trackOutstandingTimeouts) {\n      ngMod.config(['$provide', function($provide) {\n          $provide.decorator('$timeout', ['$delegate', function($delegate) {\n            var $timeout = $delegate;\n\n            var taskId = 0;\n            if (!window.NG_PENDING_TIMEOUTS) {\n              window.NG_PENDING_TIMEOUTS = {};\n            }\n              \n            var extendedTimeout = function() {\n              var args = Array.prototype.slice.call(arguments);\n              if (typeof(args[0]) !== 'function') {\n                return $timeout.apply(null, args);\n              }\n\n              taskId++;\n              var fn = args[0];\n              window
[MJSONWP] Calling AppiumDriver.execute() with args: ["return (function (trackOutstandingTimeouts) {\n    var ngMod = angular.module('protractorBaseModule_', []).\n        config(['$compileProvider', ...
[debug] [iOS] Executing iOS command 'execute'
[debug] [RemoteDebugger] Executing 'execute_script' atom in default context
[debug] [RemoteDebugger] Sending javascript command (function(){return function...
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to remote debugger
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Found data handler for response
[debug] [RemoteDebugger] Received data response from socket send: '{"status":0,"value":null}'
[debug] [RemoteDebugger] Original command: sendJSCommand
[debug] [RemoteDebugger] Received result for atom 'execute_script' execution: null
[MJSONWP] Responding to client with driver.execute() result: null
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute 200 512 ms - 76 
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute {"script":"angular.resumeBootstrap(arguments[0]);","args":[["protractorBaseModule_"]]}
[MJSONWP] Calling AppiumDriver.execute() with args: ["angular.resumeBootstrap(arguments[0]);",[["protractorBaseModule_"]],"04efb027-9ff4-4743-8280-744365d0fab1"]
[debug] [iOS] Executing iOS command 'execute'
[debug] [RemoteDebugger] Executing 'execute_script' atom in default context
[debug] [RemoteDebugger] Sending javascript command (function(){return function...
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to remote debugger
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Found data handler for response
[debug] [RemoteDebugger] Received data response from socket send: '{"status":0,"value":null}'
[debug] [RemoteDebugger] Original command: sendJSCommand
[debug] [RemoteDebugger] Received result for atom 'execute_script' execution: null
[MJSONWP] Responding to client with driver.execute() result: null
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute 200 562 ms - 76 
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute_async {"script":"try { return (function (rootSelector, callback) {\n  var el = document.querySelector(rootSelector);\n\n  try {\n    if (window.getAngularTestability) {\n      window.getAngularTestability(el).whenStable(callback);\n      return;\n    }\n    if (!window.angular) {\n      throw new Error('window.angular is undefined.  This could be either ' +\n          'because this is a non-angular page or because your test involves ' +\n          'client-side navigation, which can interfere with Protractor\\'s ' +\n          'bootstrapping.  See http://git.io/v4gXM for details');\n    }\n    if (angular.getTestability) {\n      angular.getTestability(el).whenStable(callback);\n    } else {\n      if (!angular.element(el).injector()) {\n        throw new Error('root element (' + rootSelector + ') has no injector.' +\n           ' this may mean it is not inside ng-app.');\n      }\n      angular.element(el).injector().get('$browser').\n          notifyWhenNoOutstandingRequests(callback);\n   
[MJSONWP] Calling AppiumDriver.executeAsync() with args: ["try { return (function (rootSelector, callback) {\n  var el = document.querySelector(rootSelector);\n\n  try {\n    if (window.getAngularTestabil...
[debug] [iOS] Executing iOS command 'executeAsync'
[debug] [iOS] Response url for executeAsync: http://0.0.0.0:4723/wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response
[debug] [RemoteDebugger] Executing 'execute_async_script' atom in default context
[debug] [RemoteDebugger] Sending javascript command (function(){return function...
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to remote debugger
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Found data handler for response
[debug] [RemoteDebugger] Received data response from socket send: '{"result":{"type":"undefine...'
[debug] [RemoteDebugger] Original command: sendJSCommand
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response {"status":0,"value":null}
[MJSONWP] Calling AppiumDriver.receiveAsyncResponse() with args: [0,null,"04efb027-9ff4-4743-8280-744365d0fab1"]
[debug] [iOS] Executing iOS command 'receiveAsyncResponse'
[debug] [iOS] Received async response: null
[MJSONWP] Responding to client with driver.receiveAsyncResponse() result: null
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response 200 5 ms - 76 
[MJSONWP] Responding to client with driver.executeAsync() result: null
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute_async 200 743 ms - 76 
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/elements {"using":"xpath","value":"//UIAApplication[1]/UIAWindow[2]/UIAScrollView[1]/UIAScrollView[1]/UIAWebView[1]/UIATextField[1]"}
[MJSONWP] Calling AppiumDriver.findElements() with args: ["xpath","//UIAApplication[1]/UIAWindow[2]/UIAScrollView[1]/UIAScrollView[1]/UIAWebView[1]/UIATextField[1]","04efb027-9ff4-4743-8280-744365d0fab1"]
[debug] [iOS] Executing iOS command 'findElements'
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [RemoteDebugger] Executing 'find_elements' atom in default context
[debug] [RemoteDebugger] Sending javascript command (function(){return function...
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to remote debugger
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Found data handler for response
[debug] [RemoteDebugger] Received data response from socket send: '"{\"status\":0,\"value\":[]}"'
[debug] [RemoteDebugger] Original command: sendJSCommand
[debug] [RemoteDebugger] Received result for atom 'find_elements' execution: []
[MJSONWP] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/elements 200 551 ms - 74 
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute_async {"script":"try { return (function (rootSelector, callback) {\n  var el = document.querySelector(rootSelector);\n\n  try {\n    if (window.getAngularTestability) {\n      window.getAngularTestability(el).whenStable(callback);\n      return;\n    }\n    if (!window.angular) {\n      throw new Error('window.angular is undefined.  This could be either ' +\n          'because this is a non-angular page or because your test involves ' +\n          'client-side navigation, which can interfere with Protractor\\'s ' +\n          'bootstrapping.  See http://git.io/v4gXM for details');\n    }\n    if (angular.getTestability) {\n      angular.getTestability(el).whenStable(callback);\n    } else {\n      if (!angular.element(el).injector()) {\n        throw new Error('root element (' + rootSelector + ') has no injector.' +\n           ' this may mean it is not inside ng-app.');\n      }\n      angular.element(el).injector().get('$browser').\n          notifyWhenNoOutstandingRequests(callback);\n   
[MJSONWP] Calling AppiumDriver.executeAsync() with args: ["try { return (function (rootSelector, callback) {\n  var el = document.querySelector(rootSelector);\n\n  try {\n    if (window.getAngularTestabil...
[debug] [iOS] Executing iOS command 'executeAsync'
[debug] [iOS] Response url for executeAsync: http://0.0.0.0:4723/wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response
[debug] [RemoteDebugger] Executing 'execute_async_script' atom in default context
[debug] [RemoteDebugger] Sending javascript command (function(){return function...
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to remote debugger
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response {"status":0,"value":null}
[MJSONWP] Calling AppiumDriver.receiveAsyncResponse() with args: [0,null,"04efb027-9ff4-4743-8280-744365d0fab1"]
[debug] [iOS] Executing iOS command 'receiveAsyncResponse'
[debug] [iOS] Received async response: null
[MJSONWP] Responding to client with driver.receiveAsyncResponse() result: null
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/receive_async_response 200 3 ms - 76 
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Found data handler for response
[debug] [RemoteDebugger] Received data response from socket send: '{"result":{"type":"undefine...'
[debug] [RemoteDebugger] Original command: sendJSCommand
[MJSONWP] Responding to client with driver.executeAsync() result: null
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/execute_async 200 528 ms - 76 
[HTTP] --> POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/elements {"using":"xpath","value":"//UIAApplication[1]/UIAWindow[2]/UIAScrollView[1]/UIAScrollView[1]/UIAWebView[1]/UIAStaticText[2]"}
[MJSONWP] Calling AppiumDriver.findElements() with args: ["xpath","//UIAApplication[1]/UIAWindow[2]/UIAScrollView[1]/UIAScrollView[1]/UIAWebView[1]/UIAStaticText[2]","04efb027-9ff4-4743-8280-744365d0fab1"]
[debug] [iOS] Executing iOS command 'findElements'
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [RemoteDebugger] Executing 'find_elements' atom in default context
[debug] [RemoteDebugger] Sending javascript command (function(){return function...
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to remote debugger
[debug] [RemoteDebugger] Received applicationSentData response
[debug] [RemoteDebugger] Found data handler for response
[debug] [RemoteDebugger] Received data response from socket send: '"{\"status\":0,\"value\":[]}"'
[debug] [RemoteDebugger] Original command: sendJSCommand
[debug] [RemoteDebugger] Received result for atom 'find_elements' execution: []
[MJSONWP] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1/elements 200 509 ms - 74 
[HTTP] --> DELETE /wd/hub/session/04efb027-9ff4-4743-8280-744365d0fab1 {}
[MJSONWP] Calling AppiumDriver.deleteSession() with args: ["04efb027-9ff4-4743-8280-744365d0fab1"]
[debug] [iOS] Deleting ios session
[debug] [UIAuto] Destroying instruments client socket.
[debug] [UIAuto] Closing socket server.
[debug] [UIAuto] Instruments socket server was closed
[debug] [Instruments] Starting shutdown.
[debug] [Instruments] Sending sigterm to instruments
[debug] [Instruments] [INST] 2016-04-15 10:19:05 +0000 Stopped: Script was stopped by the user
[debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:50016","WIRIsApplicationProxyKey":false,"WIRApplicationNameKey":"Safari","WIRApplicationBundleIdentifierKey":"com.apple.mobilesafari","WIRIsApplicationActiveKey":1},"__selector":"_rpc_applicationDisconnected:"}'
[debug] [RemoteDebugger] Application PID:50016 disconnected. Removing from app dictionary.
[debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:50023","WIRIsApplicationProxyKey":true,"WIRApplicationNameKey":"","WIRApplicationBundleIdentifierKey":"com.apple.WebKit.WebContent","WIRIsApplicationActiveKey":1,"WIRHostApplicationIdentifierKey":"PID:50016"},"__selector":"_rpc_applicationDisconnected:"}'
[debug] [RemoteDebugger] Application PID:50023 disconnected. Removing from app dictionary.
[debug] [RemoteDebugger] No longer have app id. Attempting to find new one.
[debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:50016","WIRIsApplicationProxyKey":false,"WIRApplicationNameKey":"Safari","WIRApplicationBundleIdentifierKey":"com.apple.mobilesafari","WIRIsApplicationActiveKey":1},"__selector":"_rpc_applicationDisconnected:"}'
[debug] [RemoteDebugger] Application PID:50016 disconnected. Removing from app dictionary.
[debug] [RemoteDebugger] Receiving data from remote debugger: '{"__argument":{"WIRApplicationIdentifierKey":"PID:50023","WIRIsApplicationProxyKey":true,"WIRApplicationNameKey":"","WIRApplicationBundleIdentifierKey":"com.apple.WebKit.WebContent","WIRIsApplicationActiveKey":1,"WIRHostApplicationIdentifierKey":"PID:50016"},"__selector":"_rpc_applicationDisconnected:"}'
[debug] [RemoteDebugger] Application PID:50023 disconnected. Removing from app dictionary.
[debug] [Instruments] [INST STDERR] 2016-04-15 12:19:06.612 instruments[49940:2672471] Attempting to change event horizon while disengage
[debug] [Instruments] [INST] Instruments Trace Complete (Duration : 62.623680s; Output : /var/folders/hy/db81jfkn23x5jxsmdnk_d_8h0000gr/T/appium-instruments/instrumentscli0.trace)
[debug] [Instruments] Instruments exited with code 0
[debug] [iOSLog] Stopping iOS log capture
[debug] [RemoteDebugger] Disconnecting from remote debugger
[debug] [iOS] Running ios sim reset flow
[debug] [iOS] Killing the simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOS] Cleaning sim state.
[debug] [iOSSim] Killing any simulator daemons for 080DA0BE-F66E-4C1D-84C5-8C405AE6E6E1
[iOSSim] Cleaning simulator 080DA0BE-F66E-4C1D-84C5-8C405AE6E6E1
[Appium] Removing session 04efb027-9ff4-4743-8280-744365d0fab1 from our master session list
[debug] [MJSONWP] Received response: null
[debug] [MJSONWP] But deleting session, so not returning
[MJSONWP] Responding to client with driver.deleteSession() result: null

Test Result Appium Log

Here my html code ​​ {{lang}}

class="login-label">Username</label> 
<input required ng-model="credentials.username" ng-focus="onFocus()" type="text"> 

<div ng-messages="loginForm.credentials.username.$error" ng-show="loginForm.credentials.username.$dirty"> 
<div ng-message="required" trans
​​late="login.MESSAGE_REQUIRED">This is required.</div> </div> </md-input-container> <md-input-container class="md-block"> <label translate="login.PASSWORD" ng-class="{'floating-label-rtl':dir==='rtl'}" 


class="login-label">Password</label> <input required ng-model="credentials.password" ng-focus="onFocus()" type="pa
​​ssword"> 
<div ng-messages="loginForm.credentials.password.$error" ng-show="loginForm.credentials.password.$dirty"> <div ng-message="required" translate="login.MESSAGE_REQUIRED">This is required.</div> </div> </md-input-container> 

<div layout-align="center center" layout="column" ng-if="oneTimePassword"> <p class="login-otp-message" translate="login.OTP_MESSAGE">Enter the code which you received by SMS</p> <md-button class="md-warn login-otp-retry" translate="login.OTP_RETRY" ng-click="retry()">Retry</md-button> </div> <md-input-container class="md-block" ng-if="oneTimePassword"> <label translate="login.SECURITY_CODE" class="login-label">Security code</label> <input required ng-model="credentials.securityCode" ng-focus="onFocus()" type="password"> <div ng-messages="loginForm.credentials.securityCode.$error" ng-show="loginForm.credentials.securityCode.$dirty"> <div ng-message="required" translate="login.MESSAGE_REQUIRED">This is required.</div> </div> </md-input-container> <div layout-align="center"> <section layout-align="center" layout="row" layout-sm="column"> <div id="login-error" md-caption class="msg-error" ng-show="error" class="label">{{error}}</div>
​​

 <md-button type="submit" class="md-raised login-button" ng-disabled="clicked" translate="login.LOGIN">Login</md-button> </section>

 </div> </fieldset> </form> <md-divider></md-divider> <footer class="login-footer"> <div layout="row" layout-align="center center"> <md-button ng-click="goToCustomerCare()" class="login-footer-link" translate="login.CUSTOMER_CARE">Contact Customer Care</md-button> <div> | </div> <md-button ng-click="showDisclaimer()" class="login-footer-link" translate="login.DISCLAIMER">Disclaimer</md-button> </div> </footer> </div>​​

0条回答
登录 后发表回答