Issue: For “XCUIElementTypeTextField” element (On iOS 13 & Above), The value is displayed as “OBJ” in the Appium Inspector and programmatically when I tried to Element.GetAttribute(“value”) I get " ". Please see attached screenshot and Page Source
I tried to get the page source and even the page source does not contain the value for “XCUIElementTypeTextField”.
But when I tried on a device with 12.4.1 OS, it works perfectly fine and displays the value in the inspector as well as page source.
I am wondering if anyone is facing the same issue ?
Configuration:
Appium version (or git revision) that exhibits the issue: 1.17.0
Desktop OS/version used to run Appium: macOS Catalina, 10.15.4
Npm or Yarn package manager:
Mobile platform/version under test: iOS
Real device or emulator/simulator: Real Device (iPhone X 13.4.1)
@Aleksei Just curious, the element I am trying to get value is not a secure field. If you notice the tree structure, it says “XCUITElementTypeTextField” as supposed to “XCUIElementTypeSecureTextField”.
@Dev_P, There is compatability issue with Xcode 11.4 version and with iOS (12.xx versions). Even i faced this issue and upgraded my iOS version from 12.xx to 13.xx . Then it worked for me. If you want to work with iOS 12.xx then you have to use old Xcode Version 10.xx and where the OS should supports xcode 10.xx verison.
If dont want to upgrade iOS Verison or downgrade Xcode versions. Please use the x,y cordinates to click the text field…
Hi @pothurajtharun,
Interesting! so here is what I observed. If the text field has a label like “Username” or a watermark, it does not return any value. If it is a plain text field without a field label or watermark, it returns the value.
Since the page source did not have any value for text field, I assumed coordinates may not do the trick but let me give it a try. I will report back