The value of the element displayed as ‘nil’ though it gets displayed in the inspector

  • iOS
  • Appium 15.1
  • Real Device
  • Ruby
  • 12.1.2

Server Logs:
[WD Proxy] Replacing sessionId D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F with f8beb23a-6ce7-4134-b8c9-6ac671a34e77
[HTTP] <-- GET /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element/D0080000-0000-0000-A501-000000000000/displayed 200 2500 ms - 66
[HTTP]
[HTTP] --> POST /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element
[HTTP] {“using”:“accessibility id”,“value”:“MessageText0”}
[debug] [W3C (f8beb23a)] Calling AppiumDriver.findElement() with args: [“accessibility id”,“MessageText0”,“f8beb23a-6ce7-4134-b8c9-6ac671a34e77”]
[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 20000 ms for condition
[debug] [WD Proxy] Matched ‘/element’ to command name ‘findElement’
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F/element] with body: {“using”:“accessibility id”,“value”:“MessageText0”}
[debug] [WD Proxy] Got response with status 200: {“value”:{“ELEMENT”:“DD080000-0000-0000-A501-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“DD080000-0000-0000-A501-000000000000”},“sessionId”:“D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F”}
[debug] [W3C (f8beb23a)] Responding to client with driver.findElement() result: {“element-6066-11e4-a52e-4f735466cecf”:“DD080000-0000-0000-A501-000000000000”,“ELEMENT”:“DD080000-0000-0000-A501-000000000000”}
[HTTP] <-- POST /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element 200 334 ms - 137
[HTTP]
[HTTP] --> GET /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element/DD080000-0000-0000-A501-000000000000/displayed
[HTTP] {}
[W3C (f8beb23a)] Driver proxy active, passing request on via HTTP proxy
[debug] [XCUITest] Executing command ‘proxyReqRes’
[debug] [WD Proxy] Matched ‘/wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element/DD080000-0000-0000-A501-000000000000/displayed’ to command name ‘elementDisplayed’
[debug] [WD Proxy] Proxying [GET /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element/DD080000-0000-0000-A501-000000000000/displayed] to [GET http://localhost:8100/session/D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F/element/DD080000-0000-0000-A501-000000000000/displayed] with body: {}
[debug] [WD Proxy] Got response with status 200: {
[debug] [WD Proxy] “value” : true,
[debug] [WD Proxy] “sessionId” : “D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F”
[debug] [WD Proxy] }
[WD Proxy] Replacing sessionId D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F with f8beb23a-6ce7-4134-b8c9-6ac671a34e77
[HTTP] <-- GET /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element/DD080000-0000-0000-A501-000000000000/displayed 200 224 ms - 65
[HTTP]
[HTTP] --> POST /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element
[HTTP] {“using”:“accessibility id”,“value”:“MessageText0”}
[debug] [W3C (f8beb23a)] Calling AppiumDriver.findElement() with args: [“accessibility id”,“MessageText0”,“f8beb23a-6ce7-4134-b8c9-6ac671a34e77”]
[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 20000 ms for condition
[debug] [WD Proxy] Matched ‘/element’ to command name ‘findElement’
[debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F/element] with body: {“using”:“accessibility id”,“value”:“MessageText0”}
[debug] [WD Proxy] Got response with status 200: {“value”:{“ELEMENT”:“DD080000-0000-0000-A501-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“DD080000-0000-0000-A501-000000000000”},“sessionId”:“D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F”}
[debug] [W3C (f8beb23a)] Responding to client with driver.findElement() result: {“element-6066-11e4-a52e-4f735466cecf”:“DD080000-0000-0000-A501-000000000000”,“ELEMENT”:“DD080000-0000-0000-A501-000000000000”}
[HTTP] <-- POST /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element 200 263 ms - 137
[HTTP]
[HTTP] --> GET /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element/DD080000-0000-0000-A501-000000000000/attribute/value
[HTTP] {}
[debug] [W3C (f8beb23a)] Calling AppiumDriver.getAttribute() with args: [“value”,“DD080000-0000-0000-A501-000000000000”,“f8beb23a-6ce7-4134-b8c9-6ac671a34e77”]
[debug] [XCUITest] Executing command ‘getAttribute’
[debug] [WD Proxy] Matched ‘/element/DD080000-0000-0000-A501-000000000000/attribute/value’ to command name ‘getAttribute’
[debug] [WD Proxy] Proxying [GET /element/DD080000-0000-0000-A501-000000000000/attribute/value] to [GET http://localhost:8100/session/D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F/element/DD080000-0000-0000-A501-000000000000/attribute/value] with no body
[debug] [WD Proxy] Got response with status 200: {
[debug] [WD Proxy] “value” : null,
[debug] [WD Proxy] “sessionId” : “D7CB10A9-D8FD-49B7-8134-B55FA28A3D6F”
[debug] [WD Proxy] }
[debug] [W3C (f8beb23a)] Responding to client with driver.getAttribute() result: null
[HTTP] <-- GET /wd/hub/session/f8beb23a-6ce7-4134-b8c9-6ac671a34e77/element/DD080000-0000-0000-A501-000000000000/attribute/value 200 138 ms - 14
[HTTP]
Tags: @@TL-9, @@android

NoMethodError: undefined method include?' for nil:NilClass ./features/support/pages/Messaging/ios_messages_page.rb:1196:inverify_snt_utf’
./features/step_definitions/message_conversations.rb:928:in /^I should be able to view the inbox for UTF$/' ./features/Messages/message_conversations.feature:10:inAnd I should be able to view the inbox for UTF’

Skipped step

Description:
Appium 15.1: On iOS and Ruby_lib latest, The value of the element is returned as ‘nil’ though the value gets displayed in the Appium inspector and the other elements around that element return values. Wondering what has changed for that particular element.

Works fine on older versions of Appium v1.9.0 which works with ruby lib.

I have tried upgrading to Appium beta version, but it didn’t help. Looking forward for suggestions.