Closed ybb8131225 closed 6 years ago
Have you tried to install and execute your app manually on the Simulator? Can you please attach the device log?
Possible duplicate of https://github.com/appium/appium/issues/9478
默认 16:44:48.559097 +0800 testmanagerd 16:44:48.559 testmanagerd[22398:320252] Attempting to perform action 2043 on <XCAccessibilityElement: 0x7f9951425400> Application with pid: 22405
默认 16:44:48.559126 +0800 testmanagerd 16:44:48.559 testmanagerd[22398:320251] Attempting to perform action 2042 on <XCAccessibilityElement: 0x7f995161bac0> Application with pid: 22405
默认 16:44:48.660300 +0800 appstored [JobPolicyManager]: Thermal state change to: 1
默认 16:44:48.660458 +0800 appstored [JobScheduler]: Processing trigger - Thermal
默认 16:44:48.662047 +0800 appstored [JobScheduler]: Looking for jobs to start. 0 active jobs(s): []
默认 16:44:48.662473 +0800 appstored [JobScheduler]: Available job slots: 3 discretionary / 3 non-discretionary
默认 16:44:48.663474 +0800 appstored [JobScheduler]: No jobs need to be started.
默认 16:44:48.778430 +0800 testmanagerd 16:44:48.778 testmanagerd[22398:320250] Attempting to perform action 2043 on <XCAccessibilityElement: 0x7f9951425400> Application with pid: 22405
默认 16:44:48.778466 +0800 testmanagerd 16:44:48.778 testmanagerd[22398:320265] Attempting to perform action 2042 on <XCAccessibilityElement: 0x7f995161bac0> Application with pid: 22405
默认 16:44:48.928861 +0800 assertiond [Keep:22405] workspaceConnectedWithTaskPortRight: received task port
默认 16:44:48.931031 +0800 Keep Retrieving resting unlock: 0
默认 16:44:48.947466 +0800 Keep [FBDisplayManager=0x600000051670] silently connecting <FBSDisplayConfiguration: 0x60000016f480; Main; mode: "375x667@2x 60Hz sRGB"> {
CADisplay.name = LCD;
CADisplay.deviceName = PurpleMain;
CADisplay.seed = 1;
tags = 0;
currentMode = <FBSDisplayMode: 0x600000268780; 375x667@2x (750x1334/2) 60Hz sRGB>;
safeOverscanRatio = {0.89999997615814209, 0.89999997615814209};
nativeCenter = {375, 667};
pixelSize = {750, 1334};
bounds = {{0, 0}, {375, 667}};
CADisplay =
Manual testing is normal
The log above does not contain any records about WebDriverAgent are you sure the log's start and end dates are correct?
How do you install your application on Simulator? Do you use xcrun simctl install
utility?
I had to start the WebDriverAgent by clicking its symbol (by hand after my last XCode update) to get it to start the subsequent times.
Maybe you can also get the WDA to work again that way.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
The problem
when test application at the beginning,it's stuck,no error
Environment
Details
my capabilities: capabilities.setCapability("platformName", "ios"); capabilities.setCapability("bundleId", "com.gotokeep.keep"); capabilities.setCapability("udid", "2825875A-5809-42D8-ADE2-694226C020DB"); capabilities.setCapability("deviceName", "iPhone Simulator"); capabilities.setCapability("automationName", "XCUITest"); capabilities.setCapability("app", appIOS.getAbsolutePath()); capabilities.setCapability("autoAcceptAlerts", true); capabilities.setCapability("locationServicesAuthorized", true); capabilities.setCapability("noReset", true); capabilities.setCapability("useNewWDA", true);
Link to Appium logs
[~/npm-global]$appium --session-override [Appium] Welcome to Appium v1.7.1 [Appium] Non-default server args: [Appium] sessionOverride: true [Appium] Appium REST http interface listener started on 0.0.0.0:4723 [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/sunyingying/autotest/KeepTestApp/apps/Keep.app","noReset":true,"bundleId":"com.gotokeep.keep","deviceName":"iPhone Simulator","locationServicesAuthorized":true,"automationName":"XCUITest","useNewWDA":true,"unicodeKeyboard":true,"platformName":"iOS","udid":"2825875A-5809-42D8-ADE2-694226C020DB","resetKeyboard":true,"autoAcceptAlerts":true}} [debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/sunyingying/autotest/KeepTestApp/apps/Keep.app","noReset":true,"bundleId":"com.gotokeep.keep","deviceName":"iPhone Simulator","locationServicesAuthorized":true,"automationName":"XCUITest","useNewWDA":true,"unicodeKeyboard":true,"platformName":"iOS","udid":"2825875A-5809-42D8-ADE2-694226C020DB","resetKeyboard":true,"autoAcceptAlerts":true},null,null] [debug] [BaseDriver] Event 'newSessionRequested' logged at 1508744312855 (15:38:32 GMT+0800 (CST)) [Appium] Creating new XCUITestDriver (v2.51.1) session [Appium] Capabilities: [Appium] app: '/Users/sunyingying/autotest/KeepTestApp/apps/Keep.app' [Appium] noReset: true [Appium] bundleId: 'com.gotokeep.keep' [Appium] deviceName: 'iPhone Simulator' [Appium] locationServicesAuthorized: true [Appium] automationName: 'XCUITest' [Appium] useNewWDA: true [Appium] unicodeKeyboard: true [Appium] platformName: 'iOS' [Appium] udid: '2825875A-5809-42D8-ADE2-694226C020DB' [Appium] resetKeyboard: true [Appium] autoAcceptAlerts: true [BaseDriver] The following capabilities were provided, but are not recognized by appium: unicodeKeyboard, resetKeyboard. [XCUITest] The capabilities 'autoAcceptAlerts' and 'autoDismissAlerts' do not work for XCUITest-based tests. Please adjust your alert handling accordingly. [BaseDriver] Session created with session id: 2ca4ffee-8c94-4b04-b4dd-9c8023d825bd [debug] [XCUITest] Xcode version set to '9.0.1' (tools v9.0.1.0.1.1506734476) [debug] [XCUITest] iOS SDK Version set to '11.0' [debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1508744312970 (15:38:32 GMT+0800 (CST)) [debug] [XCUITest] Changing deviceName from 'iPhone Simulator' to 'iPhone 6' [iOSSim] Constructing iOS simulator for Xcode version 9.0.1 with udid '2825875A-5809-42D8-ADE2-694226C020DB' [XCUITest] Determining device to run tests on: udid: '2825875A-5809-42D8-ADE2-694226C020DB', real device: false [XCUITest] No platformVersion specified. Using device version: '11.0' [BaseDriver] Using local app '/Users/sunyingying/autotest/KeepTestApp/apps/Keep.app' [debug] [BaseDriver] Event 'appConfigured' logged at 1508744313368 (15:38:33 GMT+0800 (CST)) [debug] [XCUITest] Checking whether app '/Users/sunyingying/autotest/KeepTestApp/apps/Keep.app' is actually present on file system [debug] [XCUITest] App is present [debug] [BaseDriver] Event 'resetStarted' logged at 1508744313370 (15:38:33 GMT+0800 (CST)) [debug] [XCUITest] Reset: noReset is on. Leaving simulator as is [debug] [BaseDriver] Event 'resetComplete' logged at 1508744313371 (15:38:33 GMT+0800 (CST)) [debug] [iOSLog] Starting iOS 11.0 simulator log capture [debug] [iOSLog] System log path: /Users/sunyingying/Library/Logs/CoreSimulator/2825875A-5809-42D8-ADE2-694226C020DB/system.log [debug] [BaseDriver] Event 'logCaptureStarted' logged at 1508744313390 (15:38:33 GMT+0800 (CST)) [XCUITest] Setting up simulator [debug] [iOS] No reason to set locale [debug] [iOS] Setting iOS and app preferences [debug] [iOSSim] Checking whether simulator has been run before [debug] [iOSSim] Simulator has been run before [debug] [iOS] Setting location services to 1 [debug] [iOS] Authorizing location services for app [debug] [iOSSim] Updating location client file: /Users/sunyingying/Library/Developer/CoreSimulator/Devices/2825875A-5809-42D8-ADE2-694226C020DB/data/Library/Caches/locationd/clients.plist [debug] [iOS] Updated plist files, rebooting the simulator if it's already open [debug] [iOS] Killing the simulator [debug] [iOSSim] Setting common Simulator preferences to {"ConnectHardwareKeyboard":false} [debug] [iOSSim] Updated shared Simulator preferences at '/Users/sunyingying/Library/Preferences/com.apple.iphonesimulator.plist' with {"ConnectHardwareKeyboard":false} [debug] [iOSSim] The count of running Simulator UI client instances is 0 [iOSSim] Booting Simulator with UDID 2825875A-5809-42D8-ADE2-694226C020DB... [iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 2825875A-5809-42D8-ADE2-694226C020DB -ConnectHardwareKeyboard 0 [debug] [iOSSim] The count of running Simulator UI client instances is 1 [iOSSim] Simulator with UDID 2825875A-5809-42D8-ADE2-694226C020DB booted in 11 seconds [debug] [BaseDriver] Event 'simStarted' logged at 1508744325562 (15:38:45 GMT+0800 (CST)) [debug] [XCUITest] App 'com.gotokeep.keep' is already installed. No need to reinstall. [debug] [BaseDriver] Event 'appInstalled' logged at 1508744325987 (15:38:45 GMT+0800 (CST)) [XCUITest] Using WDA path: '/Users/sunyingying/npm-global/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent' [XCUITest] Using WDA agent: '/Users/sunyingying/npm-global/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj' [debug] [XCUITest] Capability 'useNewWDA' set to true, so uninstalling WDA before proceeding [XCUITest] Shutting down sub-processes [debug] [XCUITest] Removing WDA application from device [debug] [BaseDriver] Event 'wdaUninstalled' logged at 1508744327832 (15:38:47 GMT+0800 (CST)) [debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1508744327835 (15:38:47 GMT+0800 (CST)) [XCUITest] Launching WebDriverAgent on the device [debug] [XCUITest] Carthage found: '/usr/local/bin/carthage' [debug] [XCUITest] Killing running processes 'xcodebuild.2825875A-5809-42D8-ADE2-694226C020DB, iproxy 8100, 2825875A-5809-42D8-ADE2-694226C020DB.XCTRunner' for the device 2825875A-5809-42D8-ADE2-694226C020DB... [debug] [XCUITest] 'pgrep -nif xcodebuild.2825875A-5809-42D8-ADE2-694226C020DB' didn't detect any matching processes. Return code: 1 [debug] [XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1 [debug] [XCUITest] 'pgrep -nif 2825875A-5809-42D8-ADE2-694226C020DB.XCTRunner' didn't detect any matching processes. Return code: 1 [debug] [XCUITest] Using Xcode 9.0.1, so fixing WDA codebase [debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Users/sunyingying/npm-global/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=2825875A-5809-42D8-ADE2-694226C020DB IPHONEOS_DEPLOYMENT_TARGET=11.0' in directory '/Users/sunyingying/npm-global/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent' [debug] [XCUITest] Output from xcodebuild will not be logged. To see xcode logging, use 'showXcodeLog' desired capability [debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [XCUITest] Log file for xcodebuild test: /var/folders/g6/ndfx02d53g9g6x3wsxwgtbgh0000gn/T/com.apple.dt.XCTest/IDETestRunSession-A4B5E695-6B7A-41AF-90F8-DE9CE789E3E3/WebDriverAgentRunner-55A027EC-A4F2-4388-95C0-2F0774C6F832/Session-WebDriverAgentRunner-2017-10-23_153852-XOmqw3.log [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body [debug] [JSONWP Proxy] Got response with status 200: "{\n \"value\" : {\n \"state\" : \"success\",\n \"os\" : {\n \"name\" : \"iOS\",\n \"version\" : \"11.0.1\"\n },\n \"ios\" : {\n \"simulatorVersion\" : \"11.0.1\",\n \"ip\" : \"10.2.0.57\"\n },\n \"build\" : {\n \"time\" : \"Oct 19 2017 18:23:22\"\n }\n },\n \"sessionId\" : \"ADFBB522-47E4-4BE4-841E-6D2440E1457C\",\n \"status\" : 0\n}" [debug] [XCUITest] WebDriverAgent running on ip '10.2.0.57' [debug] [XCUITest] WebDriverAgent successfully started after 9311ms [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1508744337343 (15:38:57 GMT+0800 (CST)) [debug] [XCUITest] Sending createSession command to WDA [debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.gotokeep.keep","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
Code To Reproduce Issue [ Good To Have ]
In the simulator click on the control also did not respond But i found : if my capabilities like this:
not set noReset and udid, can test application success.So, it's a problem?