iOS 14.1, can't get the page source

Xcode: 12.2
Mac OS: 10.15.6
Device : ipad air iOS 14.1
Appium desktop version: 19.0 beta
Appium command line: 19.0

I have tried to use the Appium desktop and Appium to get page source of the application but the full page source isn’t shown .

The elements can be found

2020-11-25 08:01:29:117 - [HTTP] → POST /wd/hub/session/9a79fc84-6a39-4032-8a21-1542cbf9d4d5/elements
2020-11-25 08:01:29:117 - [HTTP] {“using”:“xpath”,“value”:“//XCUIElementTypeOther[@value="\n"]”}
2020-11-25 08:01:29:118 - [debug] [W3C (9a79fc84)] Calling AppiumDriver.findElements() with args: [“xpath”,“//XCUIElementTypeOther[@value="\n"]”,“9a79fc84-6a39-4032-8a21-1542cbf9d4d5”]
2020-11-25 08:01:29:118 - [debug] [XCUITest] Executing command ‘findElements’
2020-11-25 08:01:29:119 - [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
2020-11-25 08:01:29:119 - [debug] [BaseDriver] Waiting up to 0 ms for condition
2020-11-25 08:01:29:123 - [debug] [WD Proxy] Matched ‘/elements’ to command name ‘findElements’
2020-11-25 08:01:29:124 - [debug] [WD Proxy] Proxying [POST /elements] to [POST http://127.0.0.1:8100/session/F216BA17-A1A2-4763-806A-97BE4285EE9A/elements] with body: {“using”:“xpath”,“value”:“//XCUIElementTypeOther[@value="\n"]”}
2020-11-25 08:01:32:501 - [debug] [WD Proxy] Got response with status 200: {“value”:[{“ELEMENT”:“951A0100-0000-0000-4F01-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“951A0100-0000-0000-4F01-000000000000”},{“ELEMENT”:“971A0100-0000-0000-4F01-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“971A0100-0000-0000-4F01-000000000000”},{“ELEMENT”:“991A0100-0000-0000-4F01-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“991A0100-0000-0000-4F01-000000000000”},{“ELEMENT”:“9B1A0100-0000-0000-4F01-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“9B1A0100-0000-0000-4F01-000000000000”},{“ELEMENT”:“9D1A0100-0000-0000-4F01-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“9D1A0100-0000-0000-4F01-000000000000”},{“ELEMENT”:“A01A0100-0000-0000-4F01-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“A01A0100-0000-0000-4F01-000000000000”},{“ELEMENT”:“A21A0100-0000-0000-4F01-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“A21A0100-0000-0000-4F01-000000000000”},{“ELEMENT”:“A81A0100-0000-0000-4F01-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:"A81A0100-0000-0000-4F01-00…
2020-11-25 08:01:32:505 - [debug] [W3C (9a79fc84)] Responding to client with driver.findElements() result: [{“element-6066-11e4-a52e-4f735466cecf”:“951A0100-0000-0000-4F01-000000000000”,“ELEMENT”:“951A0100-0000-0000-4F01-000000000000”},{“element-6066-11e4-a52e-4f735466cecf”:“971A0100-0000-0000-4F01-000000000000”,“ELEMENT”:“971A0100-0000-0000-4F01-000000000000”},{“element-6066-11e4-a52e-4f735466cecf”:“991A0100-0000-0000-4F01-000000000000”,“ELEMENT”:“991A0100-0000-0000-4F01-000000000000”},{“element-6066-11e4-a52e-4f735466cecf”:“9B1A0100-0000-0000-4F01-000000000000”,“ELEMENT”:“9B1A0100-0000-0000-4F01-000000000000”},{“element-6066-11e4-a52e-4f735466cecf”:“9D1A0100-0000-0000-4F01-000000000000”,“ELEMENT”:“9D1A0100-0000-0000-4F01-000000000000”},{“element-6066-11e4-a52e-4f735466cecf”:“A01A0100-0000-0000-4F01-000000000000”,“ELEMENT”:“A01A0100-0000-0000-4F01-000000000000”},{“element-6066-11e4-a52e-4f735466cecf”:“A21A0100-0000-0000-4F01-000000000000”,“ELEMENT”:“A21A0100-0000-0000-4F01-000000000000”},{“element-6066-11e4-a52e-4f735466cecf”:“A81A0100-0000-0000-4F01-000000000000”,“ELEMENT”:"A81A0100-0000-0000-4F01-00000000000…
2020-11-25 08:01:32:510 - [HTTP] ← POST /wd/hub/session/9a79fc84-6a39-4032-8a21-1542cbf9d4d5/elements 200 3391 ms - 1931`

But the page source can’t be seen

2020-11-25 08:01:32:514 - [HTTP] → GET /wd/hub/session/9a79fc84-6a39-4032-8a21-1542cbf9d4d5/source
2020-11-25 08:01:32:514 - [HTTP] {}
2020-11-25 08:01:32:515 - [debug] [W3C (9a79fc84)] Calling AppiumDriver.getPageSource() with args: [“9a79fc84-6a39-4032-8a21-1542cbf9d4d5”]
2020-11-25 08:01:32:515 - [debug] [XCUITest] Executing command ‘getPageSource’
2020-11-25 08:01:32:519 - [debug] [WD Proxy] Matched ‘/source’ to command name ‘getPageSource’
2020-11-25 08:01:32:519 - [debug] [WD Proxy] Proxying [GET /source] to [GET http://127.0.0.1:8100/session/F216BA17-A1A2-4763-806A-97BE4285EE9A/source] with no body
2020-11-25 08:01:52:445 - [debug] [WD Proxy] Got response with status 200: {“value”:“<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<XCUIElementTypeApplication type="XCUIElementTypeApplication" name="TestAPP" label="TestAPP" enabled="true" visible="true" x="0" y="0" width="768" height="1024">\n <XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="false" x="0" y="0" width="1024" height="768">\n <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="1024" height="768">\n <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="1024" height="768"/>\n <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="768" width="1024" height="353"/>\n \n \n\n”,“sessionId”:“F216BA17-A1A2-4763-806A-97BE4285EE9A”}
2020-11-25 08:01:52:454 - [debug] [W3C (9a79fc84)] Responding to client with driver.getPageSource() result: “<?xml version=\"1.0\" encoding=\"UTF-8\"?><XCUIElementTypeApplication type="XCUIElementTypeApplication" name="TestAPP" label="TestAPP" enabled="true" visible="true" x="0" y="0" width="768" height="1024">\n <XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="false" x="0" y="0" width="1024" height="768">\n <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="1024" height="768">\n <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="1024" height="768"/>\n <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="768" width="1024" height="353"/>\n \n \n”
2020-11-25 08:01:52:455 - [HTTP] ← GET /wd/hub/session/9a79fc84-6a39-4032-8a21-1542cbf9d4d5/source 200 19940 ms - 904
2020-11-25 08:01:52:455 - [HTTP] `

Please help

I can use the below java code to get the page source

{
HashMap<String, String> obj = new HashMap<String, String>();
obj.put(“format”, “xml”);
obj.put(“excludedAttributes”, “visible”);
String pageSource = ((JavascriptExecutor) driver).executeScript(“mobile:source”, obj).toString();
}