使用 appium 运行量角器脚本时:使用定位器找不到元素

2023-12-14

我正在使用 Ipad Air 模拟器、appium 和量角器来自动执行 Angular JS 站点的测试,但测试无法成功通过,它告诉我使用定位器找不到元素。 我确信 xpath 与 Appium 生成的相同。

这是我的配置文件

​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
}         
};

我想使用 Ipad Air 模拟器、appium 和量角器对 Angular JS 站点进行自动化测试,但测试无法成功通过的问题是,它告诉我无法找到该元素,并且我确定 xpath和appium生成的一样。

我的 test3.js 文件包含:

"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");


});

});

我有一个问题说:"No element found using locator : by.xpath("//UIAApplication[1]/UIAWindow[2]/UIAScrollView[1]/UIAScrollView[1]/UIA‌​WebView[1]/UIATextField[1]"))"

这是appium日志文件:

​[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

这是我的html代码 ​​ {{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>​​

None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 appium 运行量角器脚本时:使用定位器找不到元素 的相关文章

  • 如何在nodejs中处理大量对象

    我想处理长度约为 100 000 的数组 而不会给 CPU 带来太多负载 我研究了流并偶然发现了 highlandjs 但我无法使其工作 我也尝试过使用 Promise 和分块处理 但它仍然给 CPU 带来很大的负载 如果需要 程序可能会很
  • 如何使用node-sass将scss编译为css

    我有一个 master scss 其中包含许多来自其他 scss 文件的导入 如果我更改 scss 文件 master css 会自动生成 我只使用 NPM 没有使用 Gulp 或 Grunt 这应该保持不变 我当前的构建脚本 script
  • 如何更改 jasmine-node 异步规范的超时

    如何在不诉诸 running waitsFor 块的情况下通过此测试 it cannot change timeout function done request http localhost 3000 hello function err
  • Aptana Studio 有 NodeJS 插件吗?

    Aptana Studio 有 NodeJS 插件吗 至少对于 NodeJS 代码辅助来说是这样 也许是创建 NodeJS 项目的一种方法 以及本地NodeJS调试 目前我们没有 NodeJS 支持 如果社区对此感兴趣 那么提交功能请求并对
  • 如何覆盖 DOMParser 上的 node/xmldom errorHandler?

    I use https github com jindw xmldom https github com jindw xmldom并想要检查 XML 文件的解析错误 文档中写道 有必要在 DOMParser 的构造函数上覆盖 locator
  • 在 AngularJS 中单击按钮打开一个新选项卡

  • 如何在 Windows 上设置 Node.js 的工作目录?

    我刚刚安装了 Windows 版的 Node js 运行它真的是轻而易举 我想将它用作构建过程的一部分 将多个文件组合在一起 如下所示 settings var FILE ENCODING utf 8 EOL n DIST FILE PAT
  • ng-grid cellTemplate 不适用于包含的 CUSTOM_FILTERS

    当在列定义中包含 cellTemplate 时 如果该 cellTemplate 包含 CUSTOM FILTERS 则会导致 Angular 呕吐 错误 语法错误 标记 CUSTOM FILTERS 是从 CUSTOM FILTERS 开
  • 在express中设置静态javascript文件的内容类型

    我在用express使用 es6 模块提供带有 js 文件的页面 关于 es6 模块 https jakearchibald com 2017 es modules in browsers https jakearchibald com 2
  • AngularJS 与 Apache Tiles

    我在我的项目中使用 Spring MVC 和 AngularJS AngularJs 可以吗 routing和 ngView 被用来代替or与阿帕奇瓷砖框架 据我所知 使用 routing 和 ngView 我们创建模板并在单页应用程序中重
  • NodeJS 需要全局模块/包

    我正在尝试全局安装然后使用forever and forever monitor像这样 npm install g forever forever monitor 我看到了通常的输出以及将文件复制到全局路径的操作 但是如果我尝试requir
  • 如何在没有到期时间的情况下使 JWT 令牌失效

    正在使用 JWT 创建一个 Node js 后端应用程序 对我来说 要求很简单 授权令牌不应该有任何到期时间 但是当用户更改密码时 我在使 JWT 失效期间遇到问题 当用户更改密码时 我将创建一个新的 JWT 令牌 并删除旧的令牌 但用户仍
  • 咕噜玉错误

    每当我运行 grunt james 时 我都会收到错误 Warning pattern indexOf is not a function Use force to continue 现在这是我的玉石任务 jade options pret
  • 设计确认链接将用户重定向到 heroku 域而不是自定义域

    我有一个网络应用程序 前端采用 Angular 后端采用 Rails 我有一个自定义域www example com并将用户重定向到 heroku URL example herokuapp com 用户注册后 需要确认他们的电子邮件 当他
  • 在同一个 fd 上多次 createReadStream

    在上一个问题中 https stackoverflow com questions 13932967似乎从 node js 中的文件进行随机访问读取的唯一方法是使用fs createReadStream http nodejs org ap
  • 在 TFS 上构建想要从 Node.js 测试项目复制可执行文件

    我使用 Node js 工具为量角器测试环境创建了一个 Node js 项目 以在 Team Foundation 服务器上测试 Web 应用程序 我可以在本地创建测试项目并使用调试器运行它 但是 TFS 上的构建不起作用 Log
  • 使用 mongoDB 重命名集合

    我无法重命名 mongoDB 中的集合 我可以看到它存在并且可以从中写入和读取数据 我已尝试使用节点 mongo 本机驱动程序进行以下操作 db collection mycollection renameCollection mynewc
  • Google App Engine 灵活环境的定价,一堂 500 美元的课程

    我遵循 App Engine 上的 Nodejs 灵活环境教程 https cloud google com appengine docs flexible nodejs create app https cloud google com
  • AngularJS 的 HEAD 与 BODY

    在所有 AngularJS 示例中 Angular 库都放置在文档的 HEAD 标签中 我有一个基于 HTML5 Boilerplate 布局构建的现有项目 这定义了 JS 库应该放置在 DOM 的最底部 在 tag AngularJS需要
  • Promise链基本问题

    我正在尝试理解 Promise 我创建了一些有效的承诺链 而另一些则无效 我已经取得了进步 但显然缺乏基本概念 例如 以下承诺链不起作用 这是一个愚蠢的例子 但说明了问题 我正在尝试在链中使用 Node 的函数 randomBytes 两次

随机推荐

  • HTTP 服务器检测到来自 HTTP 客户端的网络连接中断

    我有一个 Web 应用程序 在向服务器发出 HTTP 请求后 客户端在客户端完全接收到响应之前退出 或网络连接中断 在这种情况下 应用程序的服务器端需要执行一些清理工作 HTTP 协议中是否有内置方法来检测这种情况 服务器如何知道客户端是否
  • SpriteKit:检测完整的节点重叠

    我有两个 SKShapeNode 一个具有基于边缘的 SKPhysicsBody 一个基于体积 我想检测它们的相交而不发生碰撞 我的工作正常 当一个方法越过另一个方法时 SKPhysicsContactDelegate 接触方法就会被调用
  • Android 可点击 TextView,带有提示和图像,用于启动搜索对话框并显示所选结果

    我正在寻找一个示例 该示例展示了如何实现可单击的文本视图 该文本视图启动 Android 默认搜索对话框并显示选定的结果行 它应该与 Android 上的 Google 地图操作栏中的搜索字段具有相同的行为和设计 例如 左侧的放大镜图标 如
  • Java Arraylist 数据提取

    您将如何提取数据 如下所示 我想从这个数组列表中提取 itemname Original number 12 itemname BBQ number 23 itemname CatchUp number 23 这个数组 Original 1
  • 使用 AppleScript 将邮件消息设置为纯文本

    我有一个 AppleScript 可以很好地整理信息并创建带有附件的电子邮件 我找不到脚本将消息格式设置为接收收件箱所需的 纯文本 而不是默认的 富文本 的方法 是否有 AppleScript 方法 或技巧 将消息格式设置为 纯文本 我在尝
  • Tensorflow:如何在 python 中编写带有梯度的操作?

    我想用 python 编写一个 TensorFlow 操作 但我希望它是可微的 能够计算梯度 这个问题询问如何在 python 中编写操作 答案建议使用 py func 没有梯度 Tensorflow 用 Python 编写操作 TF 文档
  • Lumia Imaging SDK 图像混合创建分隔线

    我正在尝试使用 Lumia Imaging SDK 创建平铺背景JpegTools BlendAsync 方法 我循环调用该方法来合并所有平铺图像 该方法有效 但输出图像中存在不需要的线条 这些分隔线出现在单个图块图像的边界处 合并不干净
  • 当文件名有空格时,运行时 exec() 不运行命令[重复]

    这个问题在这里已经有答案了 我是 Java 新手 正在尝试将我的一个项目从 C 转换为 Java 以便将其与另一个 Java 程序结合起来 当我使用 Runtime exec 时 我很难获得正确的结果 我有以下程序段 Java 忽略处理给定
  • 在cpp中将字符串转换为_T

    我想转换string or char to the T但做不到 如果我写 tcscpy cmdline T hello world 它工作得很好 但是如果我写 char msg hello world tcscpy cmdline T ms
  • Spring中的数据库连接管理

    使用 Spring 框架时我们是否必须显式管理数据库资源 比如关闭所有打开的连接等 我读到 Spring 将开发人员从此类样板代码中解放出来 这是为了回答我在 Spring Web 应用程序中遇到的错误 org springframewor
  • 模式扩展以运行命令

    知道我能跑echo or mv扩展这样的模式 echo 0 9 A Z 我很想知道是否有办法执行相同的操作但运行命令 docker compose stop rm up d 上面的例子不起作用 但有某种方法可以实现这一点 分别运行 stop
  • 如何实现错误处理?

    我的 AutoIt 脚本生成了一个我想要处理的错误 将任何错误发送到自定义函数的方式也可以 在VBA中我使用OnErrorGoTo 但我无法在 AutoIt 中找到类似的东西 我的代码 Func Start While 1 If Proce
  • Apps 脚本 - 在 Google 表格上复制“将图像放入所选单元格”

    我目前正在通过 Apps 脚本功能在 Google 表格中插入多个图像插入图片 使用它 该函数将图像插入到单元格上方 而不是单元格内部 我可以通过单击三个点按钮 然后选择 将图像放入所选单元格 将该图像插入到单元格中 如下所示link 这里
  • 没有 Google Play 的 Android Admob

    我在网上找不到任何东西 有没有办法使用 AdMob SDK 通过我的应用程序获利 而无需将应用程序放在 Google Play 商店中 你们中有人可能知道吗 提前致谢 您无需通过 Google Play 分发应用程序即可使用 AdMob S
  • 嵌套查询 MVC LINQ

    我是新来的MVC and LINQ 目前 我在该项目上遇到了困难 并决定发布 My MVC View我想要实现的目标 Cut 1 20 2 40 Color 3 30 4 50 Perm 5 10 这是我的数据表的一些示例 ID Offer
  • 未捕获的类型错误未定义不是函数

    我是 JQuery 新手 不知道如何处理诸如未捕获之类的错误TypeError undefined is not a function 我不知道如何按顺序排列下面的 jQuery 代码 有人可以安排一下吗 model Mvc4 WebGri
  • 有没有办法从 Zend Framework 的引导程序重定向浏览器?

    我需要根据引导文件中的某些条件进行重定向 这是在定义前端控制器和路由之后完成的 我怎么做 我知道我可以简单地使用 header Location 重点是我需要使用 Router 来构建 URL 一年多后 我在 ZF 编程 我为你的问题找到了
  • 如何导航到 WP7 中的不同枢轴项目

    我有一个全景页面 其中有 3 个按钮 我已将一个数据透视页添加到具有 3 个数据透视项的同一项目中 当我单击全景页面中的按钮 1 时 它应该转到数据透视页面中的第一个数据透视项目 当我单击全景页面中的按钮 2 时 它应该转到数据透视页面中的
  • Boost asio - 分离不同的数据块

    想象一下 我们创建简单的客户端 服务器应用程序来将文件从客户端发送到服务器 我们使用boost asio 服务器开始监听 客户端连接到服务器 客户端发送文件名和文件内容 但服务器只接收字节流 服务器如何检测文件名结尾和文件内容开头 我的第一
  • 使用 appium 运行量角器脚本时:使用定位器找不到元素

    我正在使用 Ipad Air 模拟器 appium 和量角器来自动执行 Angular JS 站点的测试 但测试无法成功通过 它告诉我使用定位器找不到元素 我确信 xpath 与 Appium 生成的相同 这是我的配置文件 exports