Info about page_source

I would like to have more info about the rendered xml when using the driver.page_source (in Python)

I have the following screen of an iOS application

But when I use a breakpoint in my code and check driver.page_source I can not see the hole content of the screen.

I tried also with the Appium Inspection tool but have the same result. Is this a known issue?

<?xml version="1.0" encoding="UTF-8"?><AppiumAUT><XCUIElementTypeApplication type="XCUIElementTypeApplication" name="Ⓜ️ 4.1.18" label="Ⓜ️ 4.1.18" enabled="true" visible="true" accessible="false" x="0" y="0" width="810" height="1080" index="0">
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="true" accessible="false" x="0" y="0" width="1080" height="810" index="0">
  <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" accessible="false" x="0" y="0" width="1080" height="810" index="0">
    <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" accessible="false" x="0" y="0" width="1080" height="810" index="0">
      <XCUIElementTypeButton type="XCUIElementTypeButton" name="id_splitBill_cancelPopup_confirmButton" label="Confirm" enabled="true" visible="true" accessible="true" x="545" y="448" width="196" height="64" index="0"/>
    </XCUIElementTypeOther>
  </XCUIElementTypeOther>
</XCUIElementTypeWindow>
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="false" accessible="false" x="0" y="0" width="1080" height="810" index="1">
  <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" accessible="false" x="0" y="0" width="1080" height="810" index="0">
    <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" accessible="false" x="0" y="0" width="1080" height="810" index="0"/>
    <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" accessible="false" x="0" y="810" width="1080" height="353" index="1"/>
  </XCUIElementTypeOther>
</XCUIElementTypeWindow>
</XCUIElementTypeApplication></AppiumAUT>

open xCode and check with Accessibility Inspector. can you see it?


Yes, I can see the complete structure

out of idea…

try add to caps:

 capabilities.setCapability("useJSONSource", true);

try play also with simpleIsVisibleCheck also.

I enabled both settings but still the same result

try find elements by classname ‘XCUIElementTypeButton’ on this page. How many buttons you will find? maybe it helps better…

I have in total 106 XCUIElementTypeButtons
but there reason of this is that there is another view under this one

well you can use predicate with class XCUIElementTypeButton and label=“text_need”

correct, but this doesn’t tell use why the page_source is not shown this info and even in the Appium Inspection tool

For some elements the attributes visible and accessible are set to false but they are shown on the screen. When I try to tap on it it does nothing and no error is shown. Any idea why this happens?

The information about elements visibility/accessibility is retrieved directly from XCTest. Only Apple itself can change the stuff there. Also, their framework is a black box, so there’s not much stuff there we could investigate.

visibility attribute with Apple app does not have any actual state. it was always lottery. known issue from beginning.