alibaba / macaca

Automation solution for multi-platform. 多端自动化解决方案
https://macacajs.github.io
MIT License
3.16k stars 418 forks source link

登陆时,账号输入成功,密码输入失败,session.js返回{"status":15,"sessionId":"","value":""} #981

Closed liufeng0504 closed 4 years ago

liufeng0504 commented 4 years ago

sample-nodejs@1.0.0 i /Users/fht360/Desktop/fht-macaca-tests cross-env platform=ios macaca run --verbose -p 4567 -d build/test/Me

request.js:11:12 [master] pid:1736 get remote update info failed. index.js:15:12 [master] pid:1737 webdriver server start with config: { port: 4567, verbose: false, always: true, window: true, ip: '192.168.0.200', host: 'FHT360iMac.local', loaded_time: '2020-07-17 08:33:02' } middlewares.js:17:10 [master] pid:1737 base middlewares attached router.js:132:10 [master] pid:1737 router set Macaca server started [ "/Users/fht360/Desktop/fht-macaca-tests/node_modules/.bin/mocha", "build/test/Me", "--colors", "--verbose" ]

macaca-coverage.js:14:10 [master] pid:1739 {"version":"1.0.3","runtime":"web"}

index.js:23:10 [master] pid:1739 {"version":"1.0.3","runtime":"web"}

/Users/fht360/Desktop/fht-macaca-tests/build/test/Me/myCollection.test.js

responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:03]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"iOS","deviceName":"iPhone 11 Pro","app":"/Volumes/huohuoshared/apk-app/ios8k.app","reuse":2}} session.js:58:10 [master] pid:1737 Creating session, sessionId: b57684e0-d3b7-4f06-8af8-6d1980fbb78e. ios-deploy process.env.MACACA_XCTESTWD_ROOT_PATH undefined helper.js:207:14 [master] pid:1737 Using local app form /Volumes/huohuoshared/apk-app/ios8k.app macaca-ios.js:222:10 [master] pid:1737 Get available devices [{"name":"iPhone 8","udid":"36CFAAFC-8EAD-4714-9155-02A4778703C8","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone 8 Plus","udid":"48AB0D88-C245-4B5C-AB45-AFC4111D2038","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone X","udid":"7222A30F-EFE5-4070-B32B-4343A23484BB","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone Xs","udid":"6B5D10B5-75DF-4569-B5DE-A8CFA0043026","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone Xs Max","udid":"E5082C7B-A365-4BAC-A565-8F4427DD2C43","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone Xʀ","udid":"3AEF8088-9255-4E84-84D3-EF98193F50B2","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone 11","udid":"D539892A-A9A5-4937-9561-53F1AD865C12","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone 11 Pro","udid":"F663AE7E-9CA5-4233-B6FD-CAFB9732F90E","state":"Booted","available":true,"runtime":"iOS 13.5"},{"name":"iPhone 11 Pro Max","udid":"4D519422-6037-439C-BBB0-3FB09CA8AAEF","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"Apple Watch Series 4 - 40mm","udid":"84797B22-C8CF-43A7-92CF-A753D05AFD6B","state":"Shutdown","available":true,"runtime":"watchOS 6.2"},{"name":"Apple Watch Series 4 - 44mm","udid":"04219438-66D1-4601-8A3E-E028583A99F6","state":"Shutdown","available":true,"runtime":"watchOS 6.2"},{"name":"Apple Watch Series 5 - 40mm","udid":"38CC5127-212B-4FE0-8DF0-B098E86FD5BC","state":"Shutdown","available":true,"runtime":"watchOS 6.2"},{"name":"Apple Watch Series 5 - 44mm","udid":"47B6F57D-1CBD-493E-B41A-569D4DC11031","state":"Shutdown","available":true,"runtime":"watchOS 6.2"}] CFBundleIdentifier is com.fht360.FHTIOSApp.debug Get bundleId com.fht360.FHTIOSApp.debug from plist /Volumes/huohuoshared/apk-app/ios8k.app/Info.plist macaca-ios.js:162:10 [master] pid:1737 { "bundleId": "com.fht360.FHTIOSApp.debug", "platformName": "iOS", "app": "/Volumes/huohuoshared/apk-app/ios8k.app" } xctest-client.js:56:14 [master] pid:1737 project path: /Users/fht360/Desktop/fht-macaca-tests/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj macaca-ios.js:171:12 [master] pid:1737 Trying to start xctestwd server... xctest-client.js:283:14 [master] pid:1737 xcode version: 11.5 XCTestWD version: 1.4.23 xctest-client.js:227:20 [master] pid:1737 hitted for default mode xctestwd start with port: 8001 proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session:POST to http://127.0.0.1:8001/wd/hub/session:POST with body: {"desiredCapabilities":{"bundleId":"com.fht360.FHTIOSApp.debug","platformName":"iOS","app":"/Volumes/huohuoshared/apk-app/ios8k.app"}} xctest-client.js:230:20 [master] pid:1737 please check project: /Users/fht360/Desktop/fht-macaca-tests/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj proxy.js:63:22 [master] pid:1737 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001 xctest-client.js:230:20 [master] pid:1737 please check project: /Users/fht360/Desktop/fht-macaca-tests/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj helper.js:20:18 [master] pid:1737 retrying... (10 retries left) proxy.js:63:22 [master] pid:1737 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001 helper.js:20:18 [master] pid:1737 retrying... (9 retries left) proxy.js:85:20 [master] pid:1737 Got response with status 200: {"sessionId":null,"value":{"sessionId":"68024FC7-7C10-4A35-933F-4BDC61914E61","capabilities":{"CFBundleIdentifier":"com.fht360.FHTIOSApp.debug","sdkVersion":"13.5","browserName":"飞鸽联动8k","device":"... responseHandler.js:49:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:23]: {"sessionId":"b57684e0-d3b7-4f06-8af8-6d1980fbb78e","status":0,"value":"{\"platformName\":\"iOS\",\"deviceName\":\"iPhone 11 Pro\",\"app\":\"/Volumes/huohuoshared/apk-app/ios8k.app\",\"reuse\":2,\"show\":true}"} (node:1737) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:23]: method: POST url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements, jsonBody: {"using":"name","value":"fht popover"} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements:POST to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/elements:POST with body: {"using":"name","value":"fht popover"} proxy.js:85:20 [master] pid:1737 Got response with status 200: {"sessionId":"","status":0,"value":[]} session.js:120:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:24]: {"sessionId":"","status":0,"value":"[]"} responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:24]: method: POST url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements, jsonBody: {"using":"name","value":"跳过"} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements:POST to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/elements:POST with body: {"using":"name","value":"跳过"} proxy.js:85:20 [master] pid:1737 Got response with status 200: {"sessionId":"","status":0,"value":[]} session.js:120:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:24]: {"sessionId":"","status":0,"value":"[]"} responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:25]: method: POST url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements, jsonBody: {"using":"name","value":"欢迎您登录"} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements:POST to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/elements:POST with body: {"using":"name","value":"欢迎您登录"} proxy.js:85:20 [master] pid:1737 Got response with status 200: {"sessionId":"","status":0,"value":[{"ELEMENT":"FC45CC37-2C09-4DA8-BC58-90B7B6AD3DA4","type":"XCUIElementTypeStaticText","label":"欢迎您登录"}]} session.js:120:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:25]: {"sessionId":"","status":0,"value":"[{\"ELEMENT\":\"FC45CC37-2C09-4DA8-BC58-90B7B6AD3DA4\",\"type\":\"XCUIElementTypeStaticText\",\"label\":\"欢迎您登录\"}]"} responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:26]: method: GET url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/screenshot, jsonBody: {} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/screenshot:GET to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/screenshot:GET with body: proxy.js:85:20 [master] pid:1737 Got response with status 200: {"sessionId":"b57684e0-d3b7-4f06-8af8-6d1980fbb78e","status":0,"value":"iVBORw0KGgoAAAANSUhEUgAABGUAAAmECAIAAAAjR0TuAAAAAXNSR0IArs4c6QAAAHhlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAA... responseHandler.js:49:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:26]: {"sessionId":"b57684e0-d3b7-4f06-8af8-6d1980fbb78e","status":0,"value":"\"iVBORw0KGgoAAAANSUhEUgAABGUAAAmECAIAAAAjR0TuAAAAAXNSR0IArs4c6QAAAHhlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAADYAAAAAQAAANgAAAABAAKgAgAEAAAAAQAABGWgAwAEAAAAAQAACYQAAAAAt6JlMwAAAAlwSFlzAAAhOAAAITgBRZYxYAAAABxpRE9UAAAAAgAAAAAAAATCAAAAKAAABMIAAATCAAIJ2M6DGRAAAEAASURBVHgB7J0HmBzFnbfPGJCEjdP5zvfdOftsny+fTc4YAwIhCUSUSMa2CCbIJskmB5scjUEY..."} responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:26]: method: POST url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements, jsonBody: {"using":"name","value":"请输入账号"} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements:POST to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/elements:POST with body: {"using":"name","value":"请输入账号"} proxy.js:85:20 [master] pid:1737 Got response with status 200: {"status":0,"sessionId":"","value":[{"label":"","type":"XCUIElementTypeTextField","ELEMENT":"39A071AE-DCB1-45EE-96B7-4D451916C707"}]} session.js:120:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:26]: {"status":0,"sessionId":"","value":"[{\"label\":\"\",\"type\":\"XCUIElementTypeTextField\",\"ELEMENT\":\"39A071AE-DCB1-45EE-96B7-4D451916C707\"}]"} responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:26]: method: POST url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/element/39A071AE-DCB1-45EE-96B7-4D451916C707/clear, jsonBody: {} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/element/39A071AE-DCB1-45EE-96B7-4D451916C707/clear:POST to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/element/39A071AE-DCB1-45EE-96B7-4D451916C707/clear:POST with body: {} proxy.js:85:20 [master] pid:1737 Got response with status 200: {"sessionId":"","value":"","status":0} session.js:120:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:29]: {"sessionId":"","value":"","status":0} responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:29]: method: POST url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/element/39A071AE-DCB1-45EE-96B7-4D451916C707/value, jsonBody: {"value":["18200000000"]} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/element/39A071AE-DCB1-45EE-96B7-4D451916C707/value:POST to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/element/39A071AE-DCB1-45EE-96B7-4D451916C707/value:POST with body: {"value":["18200000000"]} proxy.js:85:20 [master] pid:1737 Got response with status 200: {"status":0,"sessionId":"","value":""} session.js:120:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:34]: {"status":0,"sessionId":"","value":""} responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:36]: method: GET url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/screenshot, jsonBody: {} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/screenshot:GET to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/screenshot:GET with body: proxy.js:85:20 [master] pid:1737 Got response with status 200: {"status":0,"value":"iVBORw0KGgoAAAANSUhEUgAABGUAAAmECAIAAAAjR0TuAAAAAXNSR0IArs4c6QAAAHhlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAADY... responseHandler.js:49:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:36]: {"sessionId":"b57684e0-d3b7-4f06-8af8-6d1980fbb78e","status":0,"value":"\"iVBORw0KGgoAAAANSUhEUgAABGUAAAmECAIAAAAjR0TuAAAAAXNSR0IArs4c6QAAAHhlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAADYAAAAAQAAANgAAAABAAKgAgAEAAAAAQAABGWgAwAEAAAAAQAACYQAAAAAt6JlMwAAAAlwSFlzAAAhOAAAITgBRZYxYAAAABxpRE9UAAAAAgAAAAAAAATCAAAAKAAABMIAAATCAAILe7NqicAAAEAASURBVHgB7J0HmBzFnbfPGJCEjdP5zvfdOftsny+fTc4YAwIhCUSUSMa2CCbIJskmB5scjUEY..."} responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:36]: method: POST url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements, jsonBody: {"using":"name","value":"请输入密码"} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/elements:POST to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/elements:POST with body: {"using":"name","value":"请输入密码"} proxy.js:85:20 [master] pid:1737 Got response with status 200: {"status":0,"sessionId":"","value":[{"label":"","type":"XCUIElementTypeSecureTextField","ELEMENT":"48A9B652-FCE6-434A-9872-4090A6247EA4"}]} session.js:120:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:36]: {"status":0,"sessionId":"","value":"[{\"label\":\"\",\"type\":\"XCUIElementTypeSecureTextField\",\"ELEMENT\":\"48A9B652-FCE6-434A-9872-4090A6247EA4\"}]"} responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:36]: method: POST url: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/element/48A9B652-FCE6-434A-9872-4090A6247EA4/clear, jsonBody: {} proxy.js:55:14 [master] pid:1737 Proxy: /wd/hub/session/b57684e0-d3b7-4f06-8af8-6d1980fbb78e/element/48A9B652-FCE6-434A-9872-4090A6247EA4/clear:POST to http://127.0.0.1:8001/wd/hub/session/68024FC7-7C10-4A35-933F-4BDC61914E61/element/48A9B652-FCE6-434A-9872-4090A6247EA4/clear:POST with body: {} proxy.js:85:20 [master] pid:1737 Got response with status 200: {"status":15,"sessionId":"","value":""} session.js:120:14 [master] pid:1737 Send HTTP Respone to Client[2020-07-17 08:33:37]: {"status":15,"sessionId":"","value":""} 1) "before all" hook

/Users/fht360/Desktop/fht-macaca-tests/build/test/Me/myCompany.test.js

responseHandler.js:11:12 [master] pid:1737 Recieve HTTP Request from Client[2020-07-17 08:33:37]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"iOS","deviceName":"iPhone 11 Pro","app":"/Volumes/huohuoshared/apk-app/ios8k.app","reuse":2}} session.js:58:10 [master] pid:1737 Creating session, sessionId: b90a8c33-9a34-4064-bca8-21ab02b39f94. helper.js:207:14 [master] pid:1737 Using local app form /Volumes/huohuoshared/apk-app/ios8k.app macaca-ios.js:222:10 [master] pid:1737 Get available devices [{"name":"iPhone 8","udid":"36CFAAFC-8EAD-4714-9155-02A4778703C8","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone 8 Plus","udid":"48AB0D88-C245-4B5C-AB45-AFC4111D2038","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone X","udid":"7222A30F-EFE5-4070-B32B-4343A23484BB","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone Xs","udid":"6B5D10B5-75DF-4569-B5DE-A8CFA0043026","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone Xs Max","udid":"E5082C7B-A365-4BAC-A565-8F4427DD2C43","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone Xʀ","udid":"3AEF8088-9255-4E84-84D3-EF98193F50B2","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone 11","udid":"D539892A-A9A5-4937-9561-53F1AD865C12","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"iPhone 11 Pro","udid":"F663AE7E-9CA5-4233-B6FD-CAFB9732F90E","state":"Booted","available":true,"runtime":"iOS 13.5"},{"name":"iPhone 11 Pro Max","udid":"4D519422-6037-439C-BBB0-3FB09CA8AAEF","state":"Shutdown","available":true,"runtime":"iOS 13.5"},{"name":"Apple Watch Series 4 - 40mm","udid":"84797B22-C8CF-43A7-92CF-A753D05AFD6B","state":"Shutdown","available":true,"runtime":"watchOS 6.2"},{"name":"Apple Watch Series 4 - 44mm","udid":"04219438-66D1-4601-8A3E-E028583A99F6","state":"Shutdown","available":true,"runtime":"watchOS 6.2"},{"name":"Apple Watch Series 5 - 40mm","udid":"38CC5127-212B-4FE0-8DF0-B098E86FD5BC","state":"Shutdown","available":true,"runtime":"watchOS 6.2"},{"name":"Apple Watch Series 5 - 44mm","udid":"47B6F57D-1CBD-493E-B41A-569D4DC11031","state":"Shutdown","available":true,"runtime":"watchOS 6.2"}] CFBundleIdentifier is com.fht360.FHTIOSApp.debug Get bundleId com.fht360.FHTIOSApp.debug from plist /Volumes/huohuoshared/apk-app/ios8k.app/Info.plist macaca-ios.js:162:10 [master] pid:1737 { "bundleId": "com.fht360.FHTIOSApp.debug", "platformName": "iOS", "app": "/Volumes/huohuoshared/apk-app/ios8k.app" } xctest-client.js:56:14 [master] pid:1737 project path: /Users/fht360/Desktop/fht-macaca-tests/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj macaca-ios.js:171:12 [master] pid:1737 Trying to start xctestwd server... xctest-client.js:283:14 [master] pid:1737 xcode version: 11.5 XCTestWD version: 1.4.23

xudafeng commented 4 years ago

可以参考这个 API:

https://github.com/macaca-sample/sample-nodejs/blob/master/macaca-test/wd-extend.js#L34

macaca-bot commented 4 years ago

This is the translated issue comment: @xudafeng


You can refer to this API:

https://github.com/macaca-sample/sample-nodejs/blob/master/macaca-test/wd-extend.js#L34

liufeng0504 commented 4 years ago

@xudafeng @macaca-bot 非常感谢你们的回复。我的确是参考样例代码写的,根据elementName去查找控件也是没有问题的,问题出在了请求上,第一个账号输入框的一系列操作都没有问题的,但是找到了密码框后,clear操作就出现了问题,返回{"status":15,"sessionId":"","value":""} 。如果把对两个输入框的操作调换个顺序,则也是第二个操作会失败,我不知道问题出在了哪里,往指教。

macaca-bot commented 4 years ago

This is the translated issue comment: @liufeng0504


@xudafeng @ macaca-bot very grateful for your reply. I did refer to the sample code is written, according to elementName to find the controls is not the problem, the problem lies in the request, a series of operations on account of the input box, no problems, but later found the password box, clear operation there is a problem, return { "status": 15, "sessionId": "", "value": ""}. If the operation of the two input boxes swap sequence, the second operation will also fail, I do not know where the problem lies, to advise. ! [Image] (https://user-images.githubusercontent.com/16302205/87841319-24413b00-c8d7-11ea-8153-b7d3085c552a.png)

xudafeng commented 4 years ago

@liufeng0504

https://github.com/macacajs/XCTestWD/blob/master/XCTestWD/XCTestWD/Server/Controllers/XCTestWDElementController.swift#L215-L226

可能出问题的是对当前元素设置 text,或者键盘操作,要继续排查了。

macaca-bot commented 4 years ago

This is the translated issue comment: @xudafeng


@ Liufeng0504

https://github.com/macacajs/XCTestWD/blob/master/XCTestWD/XCTestWD/Server/Controllers/XCTestWDElementController.swift#L215-L226

May be a problem it is to set the text, or keyboard operation of the current element, to continue the investigation.