Repository: facebookarchive/WebDriverAgent

Issue #914: Element not visible Xcode 9.3 / iOS 11.3
Created: 2018-04-17T07:46:31Z
A lot of XCUIElementTypeTextField are unvisible whereas upgrade of xcode (9.2) they were visible

XCUIElementTypeCell parent is visible
Xcode 9.3 / iOS 11.3
Appium 1.8.0-beta5 (same problem with 1.7.4)

Duplicate issue #922: IOS Simulator - WebElement Click() and SendKeys() causes error when element is Displayed is false when it is visible 
Created: 2018-05-04T20:48:31Z
Appium 1.7.1
iOS 11.3
xCode 9.3
Any Simulators
I am getting the error
The element '"" StaticText' is not visible on the screen and thus is not interactable
The page is a simple login page with an input element with id="Email"
It is clearly visible on simulator and the Displayed property is always false, thus breaking when it calls Click() or SendKeys()
Any Suggestions?


LOG BELOW:
[iOSSim] Constructing iOS simulator for Xcode version 9.3 with udid 'C6651123-D126-4D47-A319-B53E0E27CC9B'
[XCUITest] Determining device to run tests on: udid: 'C6651123-D126-4D47-A319-B53E0E27CC9B', real device: false
[BaseDriver] Event 'appConfigured' logged at 1525466829143 (15:47:09 GMT-0500 (CDT))
[BaseDriver] Event 'resetStarted' logged at 1525466829144 (15:47:09 GMT-0500 (CDT))
[XCUITest] Path must be a string. Received undefined
[XCUITest] Reset: could not scrub application with id "com.test.test.dev". Leaving as is.
[BaseDriver] Event 'resetComplete' logged at 1525466829439 (15:47:09 GMT-0500 (CDT))
[XCUITest] Starting log capture for iOS Simulator with udid 'C6651123-D126-4D47-A319-B53E0E27CC9B', using 'xcrun simctl spawn C6651123-D126-4D47-A319-B53E0E27CC9B log stream --style compact'
[BaseDriver] Event 'logCaptureStarted' logged at 1525466829885 (15:47:09 GMT-0500 (CDT))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[iOSSim] Matched 1 Simulator cache item for cleanup: /Users/rsmith/Library/Developer/CoreSimulator/Devices/C6651123-D126-4D47-A319-B53E0E27CC9B/data/Library/Caches/com.apple.mobile.installd.staging
[iOSSim] Setting common Simulator preferences to {"ConnectHardwareKeyboard":false}
[iOSSim] Updated C6651123-D126-4D47-A319-B53E0E27CC9B Simulator preferences at '/Users/rsmith/Library/Preferences/com.apple.iphonesimulator.plist' with {"ConnectHardwareKeyboard":false}
[iOSSim] The count of running Simulator UI client instances is 1
[iOSSim] Both Simulator with UDID C6651123-D126-4D47-A319-B53E0E27CC9B and the UI client are currently running
[BaseDriver] Event 'simStarted' logged at 1525466830243 (15:47:10 GMT-0500 (CDT))
[XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: "{\n  "value" : {\n    "state" : "success",\n    "os" : {\n      "name" : "iOS",\n      "version" : "11.3",\n      "sdkVersion" : "11.3"\n    },\n    "ios" : {\n      "simulatorVersion" : "11.3",\n      "ip" : "10.10.1.153"\n    },\n    "build" : {\n      "time" : "May  3 2018 12:48:29"\n    }\n  },\n  "sessionId" : "7C9EA99E-215E-484E-8E7C-7A4136DCB6BB",\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.
[BaseDriver] Event 'wdaStartAttempted' logged at 1525466830510 (15:47:10 GMT-0500 (CDT))
[XCUITest] Using provided WebdriverAgent at 'http://localhost:8100/'
[BaseDriver] Event 'wdaSessionAttempted' logged at 1525466830511 (15:47:10 GMT-0500 (CDT))
[XCUITest] Sending createSession command to WDA
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got response with status 200: "{\n  "value" : {\n    "state" : "success",\n    "os" : {\n      "name" : "iOS",\n      "version" : "11.3",\n      "sdkVersion" : "11.3"\n    },\n    "ios" : {\n      "simulatorVersion" : "11.3",\n      "ip" : "10.10.1.153"\n    },\n    "build" : {\n      "time" : "May  3 2018 12:48:29"\n    }\n  },\n  "sessionId" : "7C9EA99E-215E-484E-8E7C-7A4136DCB6BB",\n  "status" : 0\n}"
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"com.test.test.dev","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}
[JSONWP Proxy] Got response with status 200: {"value":{"sessionId":"F066CFF5-7BBD-40E8-A4D4-4284C86E5360","capabilities":{"device":"ipad","browserName":"Safari Launcher","sdkVersion":"11.3","CFBundleIdentifier":"com.test.test.dev"}},"sessionId":"F066CFF5-7BBD-40E8-A4D4-4284C86E5360","status":0}
[BaseDriver] Event 'wdaSessionStarted' logged at 1525466833222 (15:47:13 GMT-0500 (CDT))
[XCUITest] Cannot find a match for DerivedData folder path from lsof. Trying to access logs
[XCUITest] Cannot grep on the the xcodebuild log file '/private/var/folders/gx/gm5czwvx17nglg_nf6ppkdkxznyhnl/T/com.apple.dt.XCTest/IDETestRunSession-00992C5C-042B-41AF-9935-78D10F224A34/WebDriverAgentRunner-F5F33774-0C6E-41FF-B5C2-5B7FE76598BB/Session-WebDriverAgentRunner-2018-05-04_145907-Ws8S4t.log'. Original error: Command 'grep /WebDriverAgentRunner- /private/var/folders/gx/gm5czwvx17nglg_nf6ppkdkxznyhnl/T/com.apple.dt.XCTest/IDETestRunSession-00992C5C-042B-41AF-9935-78D10F224A34/WebDriverAgentRunner-F5F33774-0C6E-41FF-B5C2-5B7FE76598BB/Session-WebDriverAgentRunner-2018-05-04_145907-Ws8S4t.log' exited with code 1
[XCUITest] No WebDriverAgent derived data available, so unable to mark system files for cleanup
[BaseDriver] Event 'wdaStarted' logged at 1525466833314 (15:47:13 GMT-0500 (CDT))
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[BaseDriver] Event 'orientationSet' logged at 1525466833315 (15:47:13 GMT-0500 (CDT))
[Appium] New XCUITestDriver session created successfully, session 20c7d024-b112-42aa-b276-fc1b758d1771 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1525466833316 (15:47:13 GMT-0500 (CDT))
[MJSONWP] Responding to client with driver.createSession() result: {"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"clearSystemFiles":true,"platformName":"iOS","bundleId":"com.test.test.dev","showXcodeLog":true,"deviceName":"iPad Air","platformVersion":"11.3","nativeWebTap":true,"udid":"C6651123-D126-4D47-A319-B53E0E27CC9B"}
[HTTP] <-- POST /wd/hub/session 200 6003 ms - 480
[HTTP] --> POST /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/url {"url":"https://qa.elmoanywhere.com"}
[MJSONWP] Calling AppiumDriver.setUrl() with args: ["https://qa.elmoanywhere.com","20c7d024-b112-42aa-b276-fc1b758d1771"]
[XCUITest] Executing command 'setUrl'
[iOS] Attempting to set url 'https://qa.elmoanywhere.com'
[MJSONWP] Responding to client with driver.setUrl() result: null
[HTTP] <-- POST /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/url 200 196 ms - 76
[HTTP] --> POST /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element {"using":"name","value":"Email"}
[MJSONWP] Calling AppiumDriver.findElement() with args: ["name","Email","20c7d024-b112-42aa-b276-fc1b758d1771"]
[XCUITest] Executing command 'findElement'
[BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[BaseDriver] Waiting up to 0 ms for condition
[JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/F066CFF5-7BBD-40E8-A4D4-4284C86E5360/element] with body: {"using":"name","value":"Email"}
[JSONWP Proxy] Got response with status 200: {"value":{"ELEMENT":"E4A0C7CC-F3FB-4356-8A55-C67753186D60"},"sessionId":"F066CFF5-7BBD-40E8-A4D4-4284C86E5360","status":0}
[MJSONWP] Responding to client with driver.findElement() result: {"ELEMENT":"E4A0C7CC-F3FB-4356-8A55-C67753186D60"}
[HTTP] <-- POST /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element 200 2221 ms - 122
[HTTP] --> GET /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/displayed {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[XCUITest] Executing command 'proxyReqRes'
[JSONWP Proxy] Proxying [GET /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/displayed] to [GET http://localhost:8100/session/F066CFF5-7BBD-40E8-A4D4-4284C86E5360/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/displayed] with body: {}
[JSONWP Proxy] Got response with status 200: "{\n  "value" : false,\n  "sessionId" : "F066CFF5-7BBD-40E8-A4D4-4284C86E5360",\n  "status" : 0\n}"
[JSONWP Proxy] Replacing sessionId F066CFF5-7BBD-40E8-A4D4-4284C86E5360 with 20c7d024-b112-42aa-b276-fc1b758d1771
[HTTP] <-- GET /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/displayed 200 441 ms - 77
[HTTP] --> GET /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/enabled {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[XCUITest] Executing command 'proxyReqRes'
[JSONWP Proxy] Proxying [GET /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/enabled] to [GET http://localhost:8100/session/F066CFF5-7BBD-40E8-A4D4-4284C86E5360/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/enabled] with body: {}
[JSONWP Proxy] Got response with status 200: "{\n  "value" : true,\n  "sessionId" : "F066CFF5-7BBD-40E8-A4D4-4284C86E5360",\n  "status" : 0\n}"
[JSONWP Proxy] Replacing sessionId F066CFF5-7BBD-40E8-A4D4-4284C86E5360 with 20c7d024-b112-42aa-b276-fc1b758d1771
[HTTP] <-- GET /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/enabled 200 319 ms - 76
[HTTP] --> POST /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element {"using":"id","value":"Password"}
[MJSONWP] Calling AppiumDriver.findElement() with args: ["id","Password","20c7d024-b112-42aa-b276-fc1b758d1771"]
[XCUITest] Executing command 'findElement'
[BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[BaseDriver] Waiting up to 0 ms for condition
[JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/F066CFF5-7BBD-40E8-A4D4-4284C86E5360/element] with body: {"using":"id","value":"Password"}
[JSONWP Proxy] Got response with status 200: {"value":{"ELEMENT":"2B24BA01-B0E1-49A6-A2C2-32704C08B71A"},"sessionId":"F066CFF5-7BBD-40E8-A4D4-4284C86E5360","status":0}
[MJSONWP] Responding to client with driver.findElement() result: {"ELEMENT":"2B24BA01-B0E1-49A6-A2C2-32704C08B71A"}
[HTTP] <-- POST /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element 200 226 ms - 122
[HTTP] --> GET /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/2B24BA01-B0E1-49A6-A2C2-32704C08B71A/displayed {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[XCUITest] Executing command 'proxyReqRes'
[JSONWP Proxy] Proxying [GET /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/2B24BA01-B0E1-49A6-A2C2-32704C08B71A/displayed] to [GET http://localhost:8100/session/F066CFF5-7BBD-40E8-A4D4-4284C86E5360/element/2B24BA01-B0E1-49A6-A2C2-32704C08B71A/displayed] with body: {}
[JSONWP Proxy] Got response with status 200: "{\n  "value" : false,\n  "sessionId" : "F066CFF5-7BBD-40E8-A4D4-4284C86E5360",\n  "status" : 0\n}"
[JSONWP Proxy] Replacing sessionId F066CFF5-7BBD-40E8-A4D4-4284C86E5360 with 20c7d024-b112-42aa-b276-fc1b758d1771
[HTTP] <-- GET /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/2B24BA01-B0E1-49A6-A2C2-32704C08B71A/displayed 200 321 ms - 77
[HTTP] --> POST /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/click {}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[XCUITest] Executing command 'proxyReqRes'
[JSONWP Proxy] Proxying [POST /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/click] to [POST http://localhost:8100/session/F066CFF5-7BBD-40E8-A4D4-4284C86E5360/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/click] with body: {}
[JSONWP Proxy] Got response with status 200: {"value":"Error Domain=com.facebook.WebDriverAgent Code=1 "The element '"Email" StaticText' is not visible on the screen and thus is not interactable" UserInfo={NSLocalizedDescription=The element '"Email" StaticText' is not visible on the screen and thus is not interactable}","sessionId":"F066CFF5-7BBD-40E8-A4D4-4284C86E5360","status":13}
[JSONWP Proxy] Replacing sessionId F066CFF5-7BBD-40E8-A4D4-4284C86E5360 with 20c7d024-b112-42aa-b276-fc1b758d1771
[HTTP] <-- POST /wd/hub/session/20c7d024-b112-42aa-b276-fc1b758d1771/element/E4A0C7CC-F3FB-4356-8A55-C67753186D60/click 200 1369 ms - 346

Closing comment (2018-05-04T20:53:37Z): Could also be related to #914 or #898