Mac2 driver - Length for element attribute value

#Mac2 #MacOS #Java

Hello community,

My environment:

Mac OS: 11.1 (20C69)
Programming language: java 8
Appium java client: 7.4.1
Appium server: 1.20.0

On mac (old) driver i was able to get attribute value with length more then 512 chars, but in mac2 driver seems like there is limitations for attribute value length (512 chars).
This is crucial (at least for me), because my application has a lot of tables which i can not see just in xml tree (driver.getPageSource()), thats why my team uses table representation as json value in attribute (Label, accessibilityIdentifier, placeholderValue), and it could be more than 512 chars length.
I’m not sure this is bug of appium (maybe of XCUITest helper), thats why i’m posting it here. Maybe somebody has a solution for this issue?

Example of appium response for element.getAttribute(“attributeName”) (some names was changed due to NDA):

[debug] [WD Proxy] Got response with status 200: {"value":"{\"columns\":[{\"name\":\"VALUE_1\",\"x\":0,\"width\":80.428571428571431},{\"name\":\"VALUE_2\",\"x\":80.428571428571431,\"width\":80.428571428571431},{\"name\":\"VALUE_3\",\"x\":160.85714285714286,\"width\":80.428571428571431},{\"name\":\"VALUE_4\",\"x\":241.28571428571428,\"width\":80.428571428571431},{\"name\":\"VALUE_5\",\"x\":321.71428571428572,\"width\":80.428571428571431},{\"name\":\"VALUE_5\",\"x\":402.14285714285717,\"width\":80.428571428571431},{\"name\":\"VALUE_6\",\"x\":482.57142857142861,\"width\":80.428571428571431}],\"visibleRo","sessionId":"433B9ABD-A254-4EF6-AB25-537F38208C71"}

In additional, i can see full attribute value through Accessibility Inspector ether

Appium does not cut attribute values. It must be XCTest, which returns them already shortened.