You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android runs normally, iOS runs abnormity。After normal startup of iOS app, click the page element to return the exception information:java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement
Environment
java client build version or git revision if you use some shapshot:5.0.4
Appium server version or git revision if you use some shapshot:1.6.5
Desktop OS/version used to run Appium if necessary:10.12.6
Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe:Node.js:7.2.1,Appium CLI
org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {element-6066-11e4-a52e-4f735466cecf=FA9BE76D-8E89-46ED-9EB6-D6A8DA90E5FD}
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
System info: host: 'yefandeMacBook-Pro.local', ip: 'fe80:0:0:0:888:36b9:b686:a92e%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_101'
Driver info: driver.version: IOSDriver
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:62)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.findElement(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:458)
at io.appium.java_client.DefaultGenericMobileDriver.findElementByXPath(DefaultGenericMobileDriver.java:140)
at io.appium.java_client.AppiumDriver.findElementByXPath(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.findElementByXPath(IOSDriver.java:1)
at com.xxx.qa.utils.LoginUtil.login(LoginUtil.java:43)
at com.xxx.qa.testcase.trade.confirmOrder.CheckAddressTest.checkAddressTest(CheckAddressTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:361)
... 39 more
Link to Appium logs
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxxjie4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"iOS"},"firstMatch":[]}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxxx4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"},{},{"desiredCapabilities":{"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"iOS"},"firstMatch":[]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1517296635567 (15:17:15 GMT+0800 (CST))
[Appium] Creating new XCUITestDriver (v2.67.0) session
[Appium] Capabilities:
[Appium] app: '/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip'
[Appium] noReset: true
[Appium] newCommandTimeout: 120
[Appium] platformVersion: '10.3'
[Appium] bundleId: 'com.juangua.xxxdev'
[Appium] automationName: 'XCUITest'
[Appium] autoDismissAlerts: true
[Appium] unicodeKeyboard: 'True'
[Appium] platformName: 'iOS'
[Appium] udid: 'd7e966361d39299cbc243a11cfa8acdbb364a1bf'
[Appium] deviceName: 'iphone 6s plus'
[debug] [BaseDriver]
[debug] [BaseDriver] W3C capabilities [] and MJSONWP desired capabilities were provided
[BaseDriver] Expected W3C "capabilities" to be a JSON Object but was provided with: []
[BaseDriver] Falling back to MJSONWP desired capabilities
[BaseDriver] The following capabilities were provided, but are not recognized by appium: unicodeKeyboard.
[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: f9ee175b-3961-42a6-b03f-b1d654263899
[debug] [XCUITest] Current user: 'yefan'
[debug] [XCUITest] Current version of libimobiledevice: stable 1.2.0 (bottled), HEAD
[debug] [XCUITest] Xcode version set to '9.2' (tools v9.1.0.0.1.1508540944)
[debug] [XCUITest] iOS SDK Version set to '11.2'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1517296637799 (15:17:17 GMT+0800 (CST))
[debug] [XCUITest] Available devices: d7e966361d39299cbc243a11cfa8acdbb364a1bf
[debug] [XCUITest] Creating iDevice object with udid 'd7e966361d39299cbc243a11cfa8acdbb364a1bf'
[XCUITest] Determining device to run tests on: udid: 'd7e966361d39299cbc243a11cfa8acdbb364a1bf', real device: true
[BaseDriver] Using local app '/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip'
[debug] [BaseDriver] Copying local zip to tmp dir
[BaseDriver] Unzipping local app '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/appium-app.zip'...
[debug] [BaseDriver] Unzipping /var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/appium-app.zip
[BaseDriver] Unzipped local app to '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1517296641972 (15:17:21 GMT+0800 (CST))
[debug] [XCUITest] Checking whether app '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [BaseDriver] Event 'resetStarted' logged at 1517296641975 (15:17:21 GMT+0800 (CST))
[debug] [XCUITest] Reset: fullReset not set. Leaving as is
[debug] [BaseDriver] Event 'resetComplete' logged at 1517296641976 (15:17:21 GMT+0800 (CST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Starting iOS device log capture with: 'idevicesyslog'
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1517296642341 (15:17:22 GMT+0800 (CST))
[XCUITest] Setting up real device
[debug] [XCUITest] App 'com.juangua.xxxdev' is already installed. No need to reinstall.
[debug] [BaseDriver] Event 'appInstalled' logged at 1517296642470 (15:17:22 GMT+0800 (CST))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/._appium-xcuitest-driver@2.67.0@appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/._appium-xcuitest-driver@2.67.0@appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[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" : "10.3",\n "sdkVersion" : "11.2"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "172.17.62.167"\n },\n "build" : {\n "time" : "Jan 30 2018 15:06:14"\n }\n },\n "sessionId" : "E1E51FCD-F941-48CA-BF70-DB1A992F0369",\n "status" : 0\n}"
[XCUITest] Will reuse previously cached WDA instance at 'http://localhost:8100/'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1517296642562 (15:17:22 GMT+0800 (CST))
[XCUITest] Using provided WebdriverAgent at 'http://localhost:8100/'
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1517296642564 (15:17:22 GMT+0800 (CST))
[debug] [XCUITest] Sending createSession command to WDA
[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" : "10.3",\n "sdkVersion" : "11.2"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "172.17.62.167"\n },\n "build" : {\n "time" : "Jan 30 2018 15:06:14"\n }\n },\n "sessionId" : "E1E51FCD-F941-48CA-BF70-DB1A992F0369",\n "status" : 0\n}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.juangua.xxxdev","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"149ABD31-9BEF-4E0B-B9D6-3A17BB32A8F2","capabilities":{"device":"iphone","browserName":"xxx","sdkVersion":"10.3","CFBundleIdentifier":"com.juangua.xxxdev"}},"sessionId":"149ABD31-9BEF-4E0B-B9D6-3A17BB32A8F2","status":0}
[debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1517296647565 (15:17:27 GMT+0800 (CST))
[debug] [BaseDriver] Event 'wdaStarted' logged at 1517296647566 (15:17:27 GMT+0800 (CST))
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[debug] [BaseDriver] Event 'orientationSet' logged at 1517296647568 (15:17:27 GMT+0800 (CST))
[Appium] New XCUITestDriver session created successfully, session f9ee175b-3961-42a6-b03f-b1d654263899 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1517296647571 (15:17:27 GMT+0800 (CST))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"capabilities":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"}}
[HTTP] <-- POST /wd/hub/session 200 12014 ms - 635
[HTTP] --> POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/appium/app/launch {}
[debug] [W3C] Calling AppiumDriver.launchApp() with args: ["f9ee175b-3961-42a6-b03f-b1d654263899"]
[debug] [XCUITest] Executing command 'launchApp'
[debug] [XCUITest] Current user: 'yefan'
[debug] [XCUITest] Current version of libimobiledevice: stable 1.2.0 (bottled), HEAD
[debug] [XCUITest] iOS SDK Version set to '11.2'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1517296648955 (15:17:28 GMT+0800 (CST))
[debug] [XCUITest] Available devices: d7e966361d39299cbc243a11cfa8acdbb364a1bf
[debug] [XCUITest] Creating iDevice object with udid 'd7e966361d39299cbc243a11cfa8acdbb364a1bf'
[XCUITest] Determining device to run tests on: udid: 'd7e966361d39299cbc243a11cfa8acdbb364a1bf', real device: true
[BaseDriver] Using local app '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1517296649156 (15:17:29 GMT+0800 (CST))
[debug] [XCUITest] Checking whether app '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [BaseDriver] Event 'resetStarted' logged at 1517296649157 (15:17:29 GMT+0800 (CST))
[debug] [XCUITest] Reset: fullReset not set. Leaving as is
[debug] [BaseDriver] Event 'resetComplete' logged at 1517296649158 (15:17:29 GMT+0800 (CST))
[XCUITest] Trying to start iOS log capture but it has already started!
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1517296649159 (15:17:29 GMT+0800 (CST))
[XCUITest] Setting up real device
[debug] [XCUITest] App 'com.juangua.xxxdev' is already installed. No need to reinstall.
[debug] [BaseDriver] Event 'appInstalled' logged at 1517296649382 (15:17:29 GMT+0800 (CST))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/._appium-xcuitest-driver@2.67.0@appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/._appium-xcuitest-driver@2.67.0@appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[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" : "10.3",\n "sdkVersion" : "11.2"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "172.17.62.167"\n },\n "build" : {\n "time" : "Jan 30 2018 15:06:14"\n }\n },\n "sessionId" : "149ABD31-9BEF-4E0B-B9D6-3A17BB32A8F2",\n "status" : 0\n}"
[XCUITest] Will reuse previously cached WDA instance at 'http://localhost:8100/'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1517296649478 (15:17:29 GMT+0800 (CST))
[XCUITest] Using provided WebdriverAgent at 'http://localhost:8100/'
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1517296649480 (15:17:29 GMT+0800 (CST))
[debug] [XCUITest] Sending createSession command to WDA
[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" : "10.3",\n "sdkVersion" : "11.2"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "172.17.62.167"\n },\n "build" : {\n "time" : "Jan 30 2018 15:06:14"\n }\n },\n "sessionId" : "149ABD31-9BEF-4E0B-B9D6-3A17BB32A8F2",\n "status" : 0\n}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.juangua.xxxdev","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"4B964C01-D9BD-4F03-8869-8133006E0C02","capabilities":{"device":"iphone","browserName":"xxx","sdkVersion":"10.3","CFBundleIdentifier":"com.juangua.xxxdev"}},"sessionId":"4B964C01-D9BD-4F03-8869-8133006E0C02","status":0}
[debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1517296655063 (15:17:35 GMT+0800 (CST))
[debug] [BaseDriver] Event 'wdaStarted' logged at 1517296655064 (15:17:35 GMT+0800 (CST))
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[debug] [BaseDriver] Event 'orientationSet' logged at 1517296655066 (15:17:35 GMT+0800 (CST))
[iOS] Successfully launched the '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app' app.
[debug] [W3C] Responding to client with driver.launchApp() result: null
[HTTP] <-- POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/appium/app/launch 200 7253 ms - 14
[HTTP] --> POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/element {"value":"//XCUIElementTypeStaticText[@name='我的']","using":"xpath"}
[debug] [W3C] Calling AppiumDriver.findElement() with args: ["xpath","//XCUIElementTypeStaticText[@name='我的']","f9ee175b-3961-42a6-b03f-b1d654263899"]
[debug] [XCUITest] Executing command 'findElement'
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/4B964C01-D9BD-4F03-8869-8133006E0C02/element] with body: {"using":"xpath","value":"//XCUIElementTypeStaticText[@name='我的']"}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"ELEMENT":"FA9BE76D-8E89-46ED-9EB6-D6A8DA90E5FD"},"sessionId":"4B964C01-D9BD-4F03-8869-8133006E0C02","status":0}
[debug] [W3C] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"FA9BE76D-8E89-46ED-9EB6-D6A8DA90E5FD"}
[HTTP] <-- POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/element 200 2072 ms - 88
[HTTP] --> POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/appium/app/close {}
[debug] [W3C] Calling AppiumDriver.closeApp() with args: ["f9ee175b-3961-42a6-b03f-b1d654263899"]
[debug] [XCUITest] Executing command 'closeApp'
[debug] [JSONWP Proxy] Proxying [DELETE /session/f9ee175b-3961-42a6-b03f-b1d654263899] to [DELETE http://localhost:8100/session/4B964C01-D9BD-4F03-8869-8133006E0C02] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n "value" : {\n\n },\n "sessionId" : "640FDDB4-A2A1-4764-A90B-FBBFF4ECDE16",\n "status" : 0\n}"
[iOS] Successfully closed the '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app' app.
[debug] [W3C] Responding to client with driver.closeApp() result: null
[HTTP] <-- POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/appium/app/close 200 535 ms - 14
[HTTP] --> DELETE /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899 {}
[debug] [W3C] Calling AppiumDriver.deleteSession() with args: ["f9ee175b-3961-42a6-b03f-b1d654263899"]
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1517296661565 (15:17:41 GMT+0800 (CST))
[debug] [JSONWP Proxy] Proxying [DELETE /session/f9ee175b-3961-42a6-b03f-b1d654263899] to [DELETE http://localhost:8100/session/4B964C01-D9BD-4F03-8869-8133006E0C02] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n "value" : "Session does not exist",\n "sessionId" : "640FDDB4-A2A1-4764-A90B-FBBFF4ECDE16",\n "status" : 6\n}"
[debug] [XCUITest] Unable to DELETE session on WDA: 'A session is either terminated or not started'. Continuing shutdown.
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[Appium] Removing session f9ee175b-3961-42a6-b03f-b1d654263899 from our master session list
[debug] [BaseDriver] Event 'quitSessionFinished' logged at 1517296661582 (15:17:41 GMT+0800 (CST))
[debug] [W3C] Received response: null
[debug] [W3C] But deleting session, so not returning
[debug] [W3C] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899 200 20 ms - 14
The text was updated successfully, but these errors were encountered:
Description
Android runs normally, iOS runs abnormity。After normal startup of iOS app, click the page element to return the exception information:java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement
Environment
Details
appium-xcuitest-driver:2.67.0
appium-ios-driver:1.32.0
Code To Reproduce Issue [ Good To Have ]
public static boolean login(String userName, String password,
IOSDriver driver) throws InterruptedException {
Thread.sleep(3000);
driver.findElementByXPath("//XCUIElementTypeStaticText[@name='我的']").click();
Thread.sleep(2000);
String page = driver.getPageSource();
if (!page.contains("mgjme home header setting")) {
PageFactory.initElements(new AppiumFieldDecorator(driver), new PreLoginPage());
PreLoginPage.loginAccountBtn.click();
try {
execLogin(userName, password, driver);
} catch(Exception e) {
e.printStackTrace();
return false;
}
return true;
}
if(!page.contains(userName)) {
execLogout(driver);
driver.findElementByXPath("//XCUIElementTypeStaticText[@name='我的']").click();
PageFactory.initElements(new AppiumFieldDecorator(driver), new PreLoginPage());
PreLoginPage.loginAccountBtn.click();
try {
execLogin(userName, password, driver);
} catch(Exception e) {
e.printStackTrace();
return false;
}
return true;
}
return true;
}
Ecxeption stacktraces
org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {element-6066-11e4-a52e-4f735466cecf=FA9BE76D-8E89-46ED-9EB6-D6A8DA90E5FD}
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
System info: host: 'yefandeMacBook-Pro.local', ip: 'fe80:0:0:0:888:36b9:b686:a92e%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_101'
Driver info: driver.version: IOSDriver
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:62)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.findElement(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:458)
at io.appium.java_client.DefaultGenericMobileDriver.findElementByXPath(DefaultGenericMobileDriver.java:140)
at io.appium.java_client.AppiumDriver.findElementByXPath(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.findElementByXPath(IOSDriver.java:1)
at com.xxx.qa.utils.LoginUtil.login(LoginUtil.java:43)
at com.xxx.qa.testcase.trade.confirmOrder.CheckAddressTest.checkAddressTest(CheckAddressTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:361)
... 39 more
Link to Appium logs
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxxjie4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"iOS"},"firstMatch":[]}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxxx4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"},{},{"desiredCapabilities":{"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"iOS"},"firstMatch":[]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1517296635567 (15:17:15 GMT+0800 (CST))
[Appium] Creating new XCUITestDriver (v2.67.0) session
[Appium] Capabilities:
[Appium] app: '/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip'
[Appium] noReset: true
[Appium] newCommandTimeout: 120
[Appium] platformVersion: '10.3'
[Appium] bundleId: 'com.juangua.xxxdev'
[Appium] automationName: 'XCUITest'
[Appium] autoDismissAlerts: true
[Appium] unicodeKeyboard: 'True'
[Appium] platformName: 'iOS'
[Appium] udid: 'd7e966361d39299cbc243a11cfa8acdbb364a1bf'
[Appium] deviceName: 'iphone 6s plus'
[debug] [BaseDriver]
[debug] [BaseDriver] W3C capabilities [] and MJSONWP desired capabilities were provided
[BaseDriver] Expected W3C "capabilities" to be a JSON Object but was provided with: []
[BaseDriver] Falling back to MJSONWP desired capabilities
[BaseDriver] The following capabilities were provided, but are not recognized by appium: unicodeKeyboard.
[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: f9ee175b-3961-42a6-b03f-b1d654263899
[debug] [XCUITest] Current user: 'yefan'
[debug] [XCUITest] Current version of libimobiledevice: stable 1.2.0 (bottled), HEAD
[debug] [XCUITest] Xcode version set to '9.2' (tools v9.1.0.0.1.1508540944)
[debug] [XCUITest] iOS SDK Version set to '11.2'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1517296637799 (15:17:17 GMT+0800 (CST))
[debug] [XCUITest] Available devices: d7e966361d39299cbc243a11cfa8acdbb364a1bf
[debug] [XCUITest] Creating iDevice object with udid 'd7e966361d39299cbc243a11cfa8acdbb364a1bf'
[XCUITest] Determining device to run tests on: udid: 'd7e966361d39299cbc243a11cfa8acdbb364a1bf', real device: true
[BaseDriver] Using local app '/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip'
[debug] [BaseDriver] Copying local zip to tmp dir
[BaseDriver] Unzipping local app '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/appium-app.zip'...
[debug] [BaseDriver] Unzipping /var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/appium-app.zip
[BaseDriver] Unzipped local app to '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1517296641972 (15:17:21 GMT+0800 (CST))
[debug] [XCUITest] Checking whether app '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [BaseDriver] Event 'resetStarted' logged at 1517296641975 (15:17:21 GMT+0800 (CST))
[debug] [XCUITest] Reset: fullReset not set. Leaving as is
[debug] [BaseDriver] Event 'resetComplete' logged at 1517296641976 (15:17:21 GMT+0800 (CST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Starting iOS device log capture with: 'idevicesyslog'
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1517296642341 (15:17:22 GMT+0800 (CST))
[XCUITest] Setting up real device
[debug] [XCUITest] App 'com.juangua.xxxdev' is already installed. No need to reinstall.
[debug] [BaseDriver] Event 'appInstalled' logged at 1517296642470 (15:17:22 GMT+0800 (CST))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/._appium-xcuitest-driver@2.67.0@appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/._appium-xcuitest-driver@2.67.0@appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[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" : "10.3",\n "sdkVersion" : "11.2"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "172.17.62.167"\n },\n "build" : {\n "time" : "Jan 30 2018 15:06:14"\n }\n },\n "sessionId" : "E1E51FCD-F941-48CA-BF70-DB1A992F0369",\n "status" : 0\n}"
[XCUITest] Will reuse previously cached WDA instance at 'http://localhost:8100/'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1517296642562 (15:17:22 GMT+0800 (CST))
[XCUITest] Using provided WebdriverAgent at 'http://localhost:8100/'
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1517296642564 (15:17:22 GMT+0800 (CST))
[debug] [XCUITest] Sending createSession command to WDA
[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" : "10.3",\n "sdkVersion" : "11.2"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "172.17.62.167"\n },\n "build" : {\n "time" : "Jan 30 2018 15:06:14"\n }\n },\n "sessionId" : "E1E51FCD-F941-48CA-BF70-DB1A992F0369",\n "status" : 0\n}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.juangua.xxxdev","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"149ABD31-9BEF-4E0B-B9D6-3A17BB32A8F2","capabilities":{"device":"iphone","browserName":"xxx","sdkVersion":"10.3","CFBundleIdentifier":"com.juangua.xxxdev"}},"sessionId":"149ABD31-9BEF-4E0B-B9D6-3A17BB32A8F2","status":0}
[debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1517296647565 (15:17:27 GMT+0800 (CST))
[debug] [BaseDriver] Event 'wdaStarted' logged at 1517296647566 (15:17:27 GMT+0800 (CST))
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[debug] [BaseDriver] Event 'orientationSet' logged at 1517296647568 (15:17:27 GMT+0800 (CST))
[Appium] New XCUITestDriver session created successfully, session f9ee175b-3961-42a6-b03f-b1d654263899 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1517296647571 (15:17:27 GMT+0800 (CST))
[debug] [MJSONWP] Responding to client with driver.createSession() result: {"capabilities":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"app":"/Users/yefan/Documents/code/test/UIAutomation_iOS/APK/xxx4iPhone.zip","noReset":true,"newCommandTimeout":120,"platformVersion":"10.3","bundleId":"com.juangua.xxxdev","automationName":"XCUITest","autoDismissAlerts":true,"unicodeKeyboard":"True","platformName":"iOS","udid":"d7e966361d39299cbc243a11cfa8acdbb364a1bf","deviceName":"iphone 6s plus"}}
[HTTP] <-- POST /wd/hub/session 200 12014 ms - 635
[HTTP] --> POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/appium/app/launch {}
[debug] [W3C] Calling AppiumDriver.launchApp() with args: ["f9ee175b-3961-42a6-b03f-b1d654263899"]
[debug] [XCUITest] Executing command 'launchApp'
[debug] [XCUITest] Current user: 'yefan'
[debug] [XCUITest] Current version of libimobiledevice: stable 1.2.0 (bottled), HEAD
[debug] [XCUITest] iOS SDK Version set to '11.2'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1517296648955 (15:17:28 GMT+0800 (CST))
[debug] [XCUITest] Available devices: d7e966361d39299cbc243a11cfa8acdbb364a1bf
[debug] [XCUITest] Creating iDevice object with udid 'd7e966361d39299cbc243a11cfa8acdbb364a1bf'
[XCUITest] Determining device to run tests on: udid: 'd7e966361d39299cbc243a11cfa8acdbb364a1bf', real device: true
[BaseDriver] Using local app '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1517296649156 (15:17:29 GMT+0800 (CST))
[debug] [XCUITest] Checking whether app '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [BaseDriver] Event 'resetStarted' logged at 1517296649157 (15:17:29 GMT+0800 (CST))
[debug] [XCUITest] Reset: fullReset not set. Leaving as is
[debug] [BaseDriver] Event 'resetComplete' logged at 1517296649158 (15:17:29 GMT+0800 (CST))
[XCUITest] Trying to start iOS log capture but it has already started!
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1517296649159 (15:17:29 GMT+0800 (CST))
[XCUITest] Setting up real device
[debug] [XCUITest] App 'com.juangua.xxxdev' is already installed. No need to reinstall.
[debug] [BaseDriver] Event 'appInstalled' logged at 1517296649382 (15:17:29 GMT+0800 (CST))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/._appium-xcuitest-driver@2.67.0@appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/._appium-xcuitest-driver@2.67.0@appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[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" : "10.3",\n "sdkVersion" : "11.2"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "172.17.62.167"\n },\n "build" : {\n "time" : "Jan 30 2018 15:06:14"\n }\n },\n "sessionId" : "149ABD31-9BEF-4E0B-B9D6-3A17BB32A8F2",\n "status" : 0\n}"
[XCUITest] Will reuse previously cached WDA instance at 'http://localhost:8100/'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1517296649478 (15:17:29 GMT+0800 (CST))
[XCUITest] Using provided WebdriverAgent at 'http://localhost:8100/'
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1517296649480 (15:17:29 GMT+0800 (CST))
[debug] [XCUITest] Sending createSession command to WDA
[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" : "10.3",\n "sdkVersion" : "11.2"\n },\n "ios" : {\n "simulatorVersion" : "10.3",\n "ip" : "172.17.62.167"\n },\n "build" : {\n "time" : "Jan 30 2018 15:06:14"\n }\n },\n "sessionId" : "149ABD31-9BEF-4E0B-B9D6-3A17BB32A8F2",\n "status" : 0\n}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.juangua.xxxdev","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"4B964C01-D9BD-4F03-8869-8133006E0C02","capabilities":{"device":"iphone","browserName":"xxx","sdkVersion":"10.3","CFBundleIdentifier":"com.juangua.xxxdev"}},"sessionId":"4B964C01-D9BD-4F03-8869-8133006E0C02","status":0}
[debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1517296655063 (15:17:35 GMT+0800 (CST))
[debug] [BaseDriver] Event 'wdaStarted' logged at 1517296655064 (15:17:35 GMT+0800 (CST))
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[debug] [BaseDriver] Event 'orientationSet' logged at 1517296655066 (15:17:35 GMT+0800 (CST))
[iOS] Successfully launched the '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app' app.
[debug] [W3C] Responding to client with driver.launchApp() result: null
[HTTP] <-- POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/appium/app/launch 200 7253 ms - 14
[HTTP] --> POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/element {"value":"//XCUIElementTypeStaticText[@name='我的']","using":"xpath"}
[debug] [W3C] Calling AppiumDriver.findElement() with args: ["xpath","//XCUIElementTypeStaticText[@name='我的']","f9ee175b-3961-42a6-b03f-b1d654263899"]
[debug] [XCUITest] Executing command 'findElement'
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/4B964C01-D9BD-4F03-8869-8133006E0C02/element] with body: {"using":"xpath","value":"//XCUIElementTypeStaticText[@name='我的']"}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"ELEMENT":"FA9BE76D-8E89-46ED-9EB6-D6A8DA90E5FD"},"sessionId":"4B964C01-D9BD-4F03-8869-8133006E0C02","status":0}
[debug] [W3C] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"FA9BE76D-8E89-46ED-9EB6-D6A8DA90E5FD"}
[HTTP] <-- POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/element 200 2072 ms - 88
[HTTP] --> POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/appium/app/close {}
[debug] [W3C] Calling AppiumDriver.closeApp() with args: ["f9ee175b-3961-42a6-b03f-b1d654263899"]
[debug] [XCUITest] Executing command 'closeApp'
[debug] [JSONWP Proxy] Proxying [DELETE /session/f9ee175b-3961-42a6-b03f-b1d654263899] to [DELETE http://localhost:8100/session/4B964C01-D9BD-4F03-8869-8133006E0C02] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n "value" : {\n\n },\n "sessionId" : "640FDDB4-A2A1-4764-A90B-FBBFF4ECDE16",\n "status" : 0\n}"
[iOS] Successfully closed the '/var/folders/rs/ycr5bpq97_jcxhckts453ljr0000gn/T/2018030-8471-1y5rdu0.xh5aeb3xr/xxx4iPhone.app' app.
[debug] [W3C] Responding to client with driver.closeApp() result: null
[HTTP] <-- POST /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899/appium/app/close 200 535 ms - 14
[HTTP] --> DELETE /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899 {}
[debug] [W3C] Calling AppiumDriver.deleteSession() with args: ["f9ee175b-3961-42a6-b03f-b1d654263899"]
[debug] [BaseDriver] Event 'quitSessionRequested' logged at 1517296661565 (15:17:41 GMT+0800 (CST))
[debug] [JSONWP Proxy] Proxying [DELETE /session/f9ee175b-3961-42a6-b03f-b1d654263899] to [DELETE http://localhost:8100/session/4B964C01-D9BD-4F03-8869-8133006E0C02] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n "value" : "Session does not exist",\n "sessionId" : "640FDDB4-A2A1-4764-A90B-FBBFF4ECDE16",\n "status" : 6\n}"
[debug] [XCUITest] Unable to DELETE session on WDA: 'A session is either terminated or not started'. Continuing shutdown.
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[Appium] Removing session f9ee175b-3961-42a6-b03f-b1d654263899 from our master session list
[debug] [BaseDriver] Event 'quitSessionFinished' logged at 1517296661582 (15:17:41 GMT+0800 (CST))
[debug] [W3C] Received response: null
[debug] [W3C] But deleting session, so not returning
[debug] [W3C] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/f9ee175b-3961-42a6-b03f-b1d654263899 200 20 ms - 14
The text was updated successfully, but these errors were encountered: