Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not returning elements when executing page command for ios #100

Open
danilopolicarpos opened this issue Aug 7, 2019 · 7 comments
Open

Comments

@danilopolicarpos
Copy link

Appium version (1.14.0) and appium_console (2.12.0)

Captura de Tela 2019-08-07 às 17 42 30

Appium doctor
Captura de Tela 2019-08-07 às 17 53 09

@KazuCocoa
Copy link
Member

Could you share the appium log?

I guess timeout or something happens in server-side.
(Not issue on client-side)

@danilopolicarpos
Copy link
Author

happens only on ios

[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"newCommandTimeout":999999,"platformName":"iOS","platformVersion":"12.4","deviceName":"iPhone 7","app":"/Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app","automationName":"XCUITest","waitForQuiescence":false,"connectHardwareKeyboard":true,"useNewWDA":true},"capabilities":{"firstMatch":[{"appium:newCommandTimeout":999999,"platformName":"iOS","appium:platformVersion":"12.4","appium:deviceName":"iPhone 7","appium:app":"/Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app","appium:automationName":"XCUITest","appium:waitForQuiescence":false,"appium:connectHardwareKeyboard":true,"appium:useNewWDA":true}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"newCommandTimeout":999999,"platformName":"iOS","platformVersion":"12.4","deviceName":"iPhone 7","app":"/Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app","automationName":"XCUITest","waitForQuiescence":false,"connectHardwareKeyboard":true,"useNewWDA":true},null,{"firstMatch":[{"appium:newCommandTimeout":999999,"platformName":"iOS","appium:platformVersion":"12.4","appium:deviceName":"iPhone 7","appium:app":"/Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app","appium:automationName":"XCUITest","appium:waitForQuiescence":false,"appium:connectHardwareKeyboard":true,"appium:useNewWDA":true}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1565361792382 (11:43:12 GMT-0300 (Brasilia Standard Time))
[Appium] Appium v1.13.0 creating new XCUITestDriver (v2.113.2) session
[Appium] Capabilities:
[Appium]   platformName: iOS
[Appium]   newCommandTimeout: 999999
[Appium]   platformVersion: 12.4
[Appium]   deviceName: iPhone 7
[Appium]   app: /Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app
[Appium]   automationName: XCUITest
[Appium]   waitForQuiescence: false
[Appium]   connectHardwareKeyboard: true
[Appium]   useNewWDA: true
[debug] [BaseDriver] W3C capabilities {"alwaysMatch":{"platformNa... and MJSONWP desired capabilities {"newCommandTimeout":999999... were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"platformNa...
[BaseDriver] Session created with session id: 52b55130-ddad-4356-bb70-7cff54b8eca6
[debug] [XCUITest] Current user: 'darling.lopes'
[iOSSim] Constructing iOS simulator for Xcode version 10.3 with udid '9075A008-771E-4337-B09E-C2BA59A5810A'
[XCUITest] Determining device to run tests on: udid: '9075A008-771E-4337-B09E-C2BA59A5810A', real device: false
[XCUITest] iOS SDK Version set to '12.4'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1565361793691 (11:43:13 GMT-0300 (Brasilia Standard Time))
[BaseDriver] Using local app '/Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1565361793694 (11:43:13 GMT-0300 (Brasilia Standard Time))
[debug] [XCUITest] Checking whether app '/Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app': 'menezes.SimpleCalculator'
[debug] [BaseDriver] Event 'resetStarted' logged at 1565361793698 (11:43:13 GMT-0300 (Brasilia Standard Time))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1565361794073 (11:43:14 GMT-0300 (Brasilia Standard Time))
[debug] [XCUITest] Starting log capture for iOS Simulator with udid '9075A008-771E-4337-B09E-C2BA59A5810A', using 'xcrun simctl spawn 9075A008-771E-4337-B09E-C2BA59A5810A log stream --style compact'
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1565361794720 (11:43:14 GMT-0300 (Brasilia Standard Time))
[XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[debug] [iOSSim] Setting preferences of 9075A008-771E-4337-B09E-C2BA59A5810A Simulator to {"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Updated 9075A008-771E-4337-B09E-C2BA59A5810A Simulator preferences at '/Users/darling.lopes/Library/Preferences/com.apple.iphonesimulator.plist' with {"DevicePreferences":{"9075A008-771E-4337-B09E-C2BA59A5810A":{"ConnectHardwareKeyboard":true}},"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Got Simulator UI client PID: 41400
[iOSSim] Both Simulator with UDID 9075A008-771E-4337-B09E-C2BA59A5810A and the UI client are currently running
[debug] [BaseDriver] Event 'simStarted' logged at 1565361795017 (11:43:15 GMT-0300 (Brasilia Standard Time))
[debug] [XCUITest] Verifying application platform
[debug] [XCUITest] CFBundleSupportedPlatforms: ["iPhoneSimulator"]
[debug] [XCUITest] Reset requested. Removing app with id 'menezes.SimpleCalculator' from the device
[debug] [XCUITest] Cleaning installd cache to save the disk space
[debug] [XCUITest] Installing '/Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app' on Simulator with UUID '9075A008-771E-4337-B09E-C2BA59A5810A'...
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1565361797926 (11:43:17 GMT-0300 (Brasilia Standard Time))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [XCUITest] Parsed BUILD_DIR configuration value: '/Users/darling.lopes/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products'
[debug] [XCUITest] Got derived data root: '/Users/darling.lopes/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy'
[debug] [XCUITest] Starting WebDriverAgent initialization with the synchronization key '/Users/darling.lopes/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy'
[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 1565361801536 (11:43:21 GMT-0300 (Brasilia Standard Time))
[debug] [XCUITest] Trying to start WebDriverAgent 2 times with 10000ms interval
[debug] [XCUITest] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1565361801538 (11:43:21 GMT-0300 (Brasilia Standard Time))
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Killing running processes 'xcodebuild.*9075A008-771E-4337-B09E-C2BA59A5810A, iproxy 8100, 9075A008-771E-4337-B09E-C2BA59A5810A.*XCTRunner' for the device 9075A008-771E-4337-B09E-C2BA59A5810A...
[debug] [XCUITest] 'pgrep -nif xcodebuild.*9075A008-771E-4337-B09E-C2BA59A5810A' 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 9075A008-771E-4337-B09E-C2BA59A5810A.*XCTRunner' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -derivedDataPath /Users/darling.lopes/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy -destination id=9075A008-771E-4337-B09E-C2BA59A5810A IPHONEOS_DEPLOYMENT_TARGET=12.4 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [XCUITest] Output from xcodebuild will only be logged if any errors are present there. To change this, use 'showXcodeLog' desired capability
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [XCUITest] Log file for xcodebuild test: /Users/darling.lopes/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/Test-WebDriverAgentRunner-2019.08.09_11-43-23--0300.xcresult/2_Test/Diagnostics/WebDriverAgentRunner-ED5024E1-CBE2-433B-B6F5-22B066D7E6AA/WebDriverAgentRunner-80C72E55-3C58-4ABC-B67C-1C2A7E7342A4/Session-WebDriverAgentRunner-2019-08-09_114323-h7cz3E.log
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[WD Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [WD Proxy] Got response with status 200: "{\n  \"value\" : {\n    \"state\" : \"success\",\n    \"os\" : {\n      \"name\" : \"iOS\",\n      \"version\" : \"12.4\",\n      \"sdkVersion\" : \"12.2\"\n    },\n    \"ios\" : {\n      \"simulatorVersion\" : \"12.4\",\n      \"ip\" : \"10.200.10.120\"\n    },\n    \"build\" : {\n      \"upgradedAt\" : \"1560793237662\",\n      \"time\" : \"Jul 24 2019 11:45:04\",\n      \"productBundleIdentifier\" : \"com.facebook.WebDriverAgentRunner\"\n    }\n  },\n  \"sessionId\" : \"9B0C5F5A-7300-4A43-8F18-864D1842505C\",\n  \"status\" : 0\n}"
[debug] [WD Proxy] Determined that the downstream protocol for proxy is MJSONWP
[debug] [XCUITest] WebDriverAgent information:
[debug] [XCUITest] {
[debug] [XCUITest]   "state": "success",
[debug] [XCUITest]   "os": {
[debug] [XCUITest]     "name": "iOS",
[debug] [XCUITest]     "version": "12.4",
[debug] [XCUITest]     "sdkVersion": "12.2"
[debug] [XCUITest]   },
[debug] [XCUITest]   "ios": {
[debug] [XCUITest]     "simulatorVersion": "12.4",
[debug] [XCUITest]     "ip": "10.200.10.120"
[debug] [XCUITest]   },
[debug] [XCUITest]   "build": {
[debug] [XCUITest]     "upgradedAt": "1560793237662",
[debug] [XCUITest]     "time": "Jul 24 2019 11:45:04",
[debug] [XCUITest]     "productBundleIdentifier": "com.facebook.WebDriverAgentRunner"
[debug] [XCUITest]   }
[debug] [XCUITest] }
[debug] [XCUITest] WebDriverAgent successfully started after 5613ms
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1565361807379 (11:43:27 GMT-0300 (Brasilia Standard Time))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"menezes.SimpleCalculator","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":false,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[debug] [WD Proxy] Got response with status 200: {"value":{"sessionId":"8715EB98-6E17-43F9-ADC1-CE866B276B87","capabilities":{"device":"iphone","browserName":"SimpleCalculator","sdkVersion":"12.4","CFBundleIdentifier":"menezes.SimpleCalculator"}},"sessionId":"8715EB98-6E17-43F9-ADC1-CE866B276B87","status":0}
[debug] [WD Proxy] Determined that the downstream protocol for proxy is MJSONWP
[debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1565361808778 (11:43:28 GMT-0300 (Brasilia Standard Time))
[debug] [BaseDriver] Event 'wdaStarted' logged at 1565361808778 (11:43:28 GMT-0300 (Brasilia Standard Time))
[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 1565361808779 (11:43:28 GMT-0300 (Brasilia Standard Time))
[Appium] New XCUITestDriver session created successfully, session 52b55130-ddad-4356-bb70-7cff54b8eca6 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1565361808780 (11:43:28 GMT-0300 (Brasilia Standard Time))
[debug] [W3C (52b55130)] Cached the protocol value 'W3C' for the new session 52b55130-ddad-4356-bb70-7cff54b8eca6
[debug] [W3C (52b55130)] Responding to client with driver.createSession() result: {"capabilities":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"platformName":"iOS","newCommandTimeout":999999,"platformVersion":"12.4","deviceName":"iPhone 7","app":"/Users/darling.lopes/Documents/ios_appium_test/features/support/SimpleCalculator.app","automationName":"XCUITest","waitForQuiescence":false,"connectHardwareKeyboard":true,"useNewWDA":true,"udid":"9075A008-771E-4337-B09E-C2BA59A5810A"}}
[HTTP] <-- POST /wd/hub/session 200 16404 ms - 613
[HTTP]
[HTTP] --> POST /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/timeouts
[HTTP] {"implicit":0}
[debug] [W3C (52b55130)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,0,"52b55130-ddad-4356-bb70-7cff54b8eca6"]
[debug] [XCUITest] Executing command 'timeouts'
[debug] [BaseDriver] W3C timeout argument: {"implicit":0}}
[debug] [BaseDriver] Set implicit wait to 0ms
[debug] [W3C (52b55130)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/timeouts 200 53 ms - 14
[HTTP]
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.13.0"}}
[HTTP] <-- GET /wd/hub/status 200 1 ms - 68
[HTTP]
[HTTP] --> GET /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/source
[HTTP] {}
[debug] [W3C (52b55130)] Calling AppiumDriver.getPageSource() with args: ["52b55130-ddad-4356-bb70-7cff54b8eca6"]
[debug] [XCUITest] Executing command 'getPageSource'
[debug] [WD Proxy] Matched '/source' to command name 'getPageSource'
[debug] [WD Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/8715EB98-6E17-43F9-ADC1-CE866B276B87/source] with no body
[debug] [WD Proxy] Got response with status 200: "{\n  \"value\" : \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<XCUIElementTypeApplication type=\\\"XCUIElementTypeApplication\\\" name=\\\"SimpleCalculator\\\" label=\\\"SimpleCalculator\\\" enabled=\\\"true\\\" visible=\\\"true\\\" x=\\\"0\\\" y=\\\"0\\\" width=\\\"375\\\" height=\\\"667\\\">\\n  <XCUIElementTypeWindow type=\\\"XCUIElementTypeWindow\\\" enabled=\\\"true\\\" visible=\\\"true\\\" x=\\\"0\\\" y=\\\"0\\\" width=\\\"375\\\" height=\\\"667\\\">\\n    <XCUIElementTypeOther type=\\\"XCUIElementTypeOther\\\" enabled=\\\"true\\\" visible=\\\"true\\\" x=\\\"0\\\" y=\\\"0\\\" width=\\\"375\\\" height=\\\"667\\\">\\n      <XCUIElementTypeStaticText type=\\\"XCUIElementTypeStaticText\\\" value=\\\"0\\\" name=\\\"apple_result_text\\\" label=\\\"0\\\" enabled=\\\"true\\\" visible=\\\"true\\\" x=\\\"28\\\" y=\\\"48\\\" width=\\\"318\\\" height=\\\"132\\\"\\/>\\n      <XCUIElementTypeTextField type=\\\"XCUIElementTypeTextField\\\" value=\\\"First Number\\\" name=\\\"apple_first_input\\\" label=\...
[debug] [W3C (52b55130)] Responding to client with driver.getPageSource() result: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><AppiumAUT><XCUIElementTypeApplication type=\"XCUIElementTypeApplication\" name=\"SimpleCalculator\" label=\"SimpleCalculator\" enabled=\"true\" visible=\"true\" x=\"0\" y=\"0\" width=\"375\" height=\"667\">\n  <XCUIElementTypeWindow type=\"XCUIElementTypeWindow\" enabled=\"true\" visible=\"true\" x=\"0\" y=\"0\" width=\"375\" height=\"667\">\n    <XCUIElementTypeOther type=\"XCUIElementTypeOther\" enabled=\"true\" visible=\"true\" x=\"0\" y=\"0\" width=\"375\" height=\"667\">\n      <XCUIElementTypeStaticText type=\"XCUIElementTypeStaticText\" value=\"0\" name=\"apple_result_text\" label=\"0\" enabled=\"true\" visible=\"true\" x=\"28\" y=\"48\" width=\"318\" height=\"132\"/>\n      <XCUIElementTypeTextField type=\"XCUIElementTypeTextField\" value=\"First Number\" name=\"apple_first_input\" label=\"\" enabled=\"false\" visible=\"true\" x=\"40\" y=\"248\" width=\"294\" height=\"30\"/>\n      <XCUIElementTypeTextField type=\"XCUIElementTypeTextField\" value=\"Second...
[HTTP] <-- GET /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/source 200 261 ms - 3406
[HTTP]
[HTTP] --> GET /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/context
[HTTP] {}
[debug] [W3C (52b55130)] Calling AppiumDriver.getCurrentContext() with args: ["52b55130-ddad-4356-bb70-7cff54b8eca6"]
[debug] [XCUITest] Executing command 'getCurrentContext'
[debug] [W3C (52b55130)] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/context 200 3 ms - 22
[HTTP]
[HTTP] --> GET /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/context
[HTTP] {}
[debug] [W3C (52b55130)] Calling AppiumDriver.getCurrentContext() with args: ["52b55130-ddad-4356-bb70-7cff54b8eca6"]
[debug] [XCUITest] Executing command 'getCurrentContext'
[debug] [W3C (52b55130)] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/context 200 1 ms - 22
[HTTP]

@KazuCocoa
Copy link
Member

? [HTTP] --> GET /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/source
[HTTP] {}
[debug] [W3C (52b55130)] Calling AppiumDriver.getPageSource() with args: ["52b55130-ddad-4356-bb70-7cff54b8eca6"]
[debug] [XCUITest] Executing command 'getPageSource'
[debug] [WD Proxy] Matched '/source' to command name 'getPageSource'
[debug] [WD Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/8715EB98-6E17-43F9-ADC1-CE866B276B87/source] with no body
[debug] [WD Proxy] Got response with status 200: "{\n "value" : "\n<XCUIElementTypeApplication type=\"XCUIElementTypeApplication\" name=\"SimpleCalculator\" label=\"SimpleCalculator\" enabled=\"true\" visible=\"true\" x=\"0\" y=\"0\" width=\"375\" height=\"667\">\n <XCUIElementTypeWindow type=\"XCUIElementTypeWindow\" enabled=\"true\" visible=\"true\" x=\"0\" y=\"0\" width=\"375\" height=\"667\">\n <XCUIElementTypeOther type=\"XCUIElementTypeOther\" enabled=\"true\" visible=\"true\" x=\"0\" y=\"0\" width=\"375\" height=\"667\">\n <XCUIElementTypeStaticText type=\"XCUIElementTypeStaticText\" value=\"0\" name=\"apple_result_text\" label=\"0\" enabled=\"true\" visible=\"true\" x=\"28\" y=\"48\" width=\"318\" height=\"132\"\/>\n <XCUIElementTypeTextField type=\"XCUIElementTypeTextField\" value=\"First Number\" name=\"apple_first_input\" label=...
[debug] [W3C (52b55130)] Responding to client with driver.getPageSource() result: "<XCUIElementTypeApplication type="XCUIElementTypeApplication" name="SimpleCalculator" label="SimpleCalculator" enabled="true" visible="true" x="0" y="0" width="375" height="667">\n <XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="true" x="0" y="0" width="375" height="667">\n <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" x="0" y="0" width="375" height="667">\n <XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="0" name="apple_result_text" label="0" enabled="true" visible="true" x="28" y="48" width="318" height="132"/>\n <XCUIElementTypeTextField type="XCUIElementTypeTextField" value="First Number" name="apple_first_input" label="" enabled="false" visible="true" x="40" y="248" width="294" height="30"/>\n <XCUIElementTypeTextField type="XCUIElementTypeTextField" value="Second...
[HTTP] <-- GET /wd/hub/session/52b55130-ddad-4356-bb70-7cff54b8eca6/source 200 261 ms - 3406
[HTTP]

Do you mean ruby console shows nil while page source returns XML?
Or the response also blank?


If the response I blank, I assume it needs much time to resolve the source data.
You can increase the timeout from current beta via settings API.
https://github.com/appium/appium/pull/12902/files

You can also use execute_script("mobile: source", { "format" => "description"}) as a debug. It returns string formatted text.
http://appium.io/docs/en/commands/mobile-command/

@danilopolicarpos
Copy link
Author

On android show this by executing the page command
Captura de Tela 2019-08-09 às 22 58 43

On ios not returning elements
Captura de Tela 2019-08-07 às 17 42 30

@KazuCocoa
Copy link
Member

Can you share the output of source or get_source as a text format?
I need to debug where the iOS source has the issue.

@danilopolicarpos
Copy link
Author

Console ios using get_source
Captura de Tela 2019-08-12 às 13 07 03

appium_server
Captura de Tela 2019-08-12 às 13 08 37

@KazuCocoa
Copy link
Member

Thanks, but could you attach as a text instead of image? (Simply, compy & paste is fine)
I would like to debug on my local.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants