Unable to see button object on mobile with object spy

I’m unable to identify the DONE button object on my AUT on iOS using Object Spy. The button is not seen when hovering over it nor when I capture objects. The CANCEL button to the left of the DONE button is seen and identifiable. How can I identify the DONE button in this instance?

1 Like

Hi there, :wave:

Thank you very much for your topic! It may take a little while before Katalon team member or others forum members respond to you.

In the meantime, you can double-check your post to see if you can add any extra information i.e. error logs, HTML codes, screenshots, etc. Check out this posting guide to help us help you better!

Thanks! :sunglasses:
Katalon Community team

1 Like

Hi @JTConstellation,

Welcome back to our community. Have you been able to click both buttons manually and only faced this with Object Spy? Can you please help share your code? And try Recording if possible.

1 Like

Yes I am able to click both buttons manually. I tried recording and I am not able to interact with the DONE button there either. I can interact with the CANCEL button while recording. I can share code but since the object is not seen I do not have a object in place in my code. I tried to to tap at position but my coordinates do not appear to be correct as it’s not clicking the DONE button area.

Here is an example of what I’m wanting to do code wise. Note the DONE button is pseudo and doesn’t actually exist since I cannot see the object.

Mobile.setText(findTestObject('Object Repository/iOS/Services/Profile/XCUIElementTypeTextField - Email Address'), 'autotest@test.com', 0)
Mobile.hideKeyboard()
Mobile.delay(5)
Mobile.tap(findTestObject('Object Repository/iOS/Services/Profile/XCUIElementTypeOther - Save'), 0)
Mobile.waitForElementPresent(findTestObject('Object Repository/iOS/Services/Profile/XCUIElementTypeSecureTextField - Enter Password'), 8)
Mobile.setText(findTestObject('Object Repository/iOS/Services/Profile/XCUIElementTypeSecureTextField - Enter Password'), password, 0)
Mobile.hideKeyboard()
Mobile.delay(4)
Mobile.tap(findTestObject('Object Repository/iOS/Services/Profile/XCUIElementTypeButton - DONE'), 0) //this line is Pseudo code

@Elly_Tran should I create a support ticket for this issue so it can be investigated?

Hi,

If Cancel button is clickable, I suggest that you can use XPATH of Done related to Cancel as follow:

//XCUIElementTypeButton[@label='CANCEL']/following-sibling::XCUIElementTypeButton

More over, to make sure it is not overlapped or hidden, can you try scroll to text or check the coordinates carefully again to tapAtPosition correctly? If it does not work, can you please help record your actions and send it to us? Thank you

Thanks I appreciate your tips! I tried scrollToText and the text ‘DONE’ is not found, I also tried implementing the xpath and it did not work as well unfortunately. I checked the XML for the screen and Appium doesn’t see the object as the Object Spy and the inspector on Kobiton can only see the CANCEL button as well. No luck with tap at Position yet but I’m still working with it hoping I can get it click the button’s area. Anything else that I can do or that could be done to identify the DONE button?

Here is the XML of the screen:

<SCREEN type="SCREEN" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="0">
  <XCUIElementTypeApplication type="XCUIElementTypeApplication" name="Stage Test Hubble" label="Stage Test Hubble" id="Stage Test Hubble" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="0">
    <XCUIElementTypeWindow type="XCUIElementTypeWindow" label="" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="0">
      <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="0">
        <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="0">
          <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="0">
            <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="47" width="390" height="713" index="0">
              <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="47" width="390" height="713" index="0">
                <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="47" width="390" height="713" index="0">
                  <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="47" width="390" height="713" index="0">
                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="47" width="390" height="713" index="0">
                      <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="47" width="390" height="60" index="0" />
                      <XCUIElementTypeButton type="XCUIElementTypeButton" name="BACK TO DASHBOARD" label="BACK TO DASHBOARD" id="BACK TO DASHBOARD" enabled="true" accessible="true" visible="true" x="0" y="47" width="321" height="60" index="1">
                        <XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="BACK TO DASHBOARD" name="BACK TO DASHBOARD" label="BACK TO DASHBOARD" id="BACK TO DASHBOARD" enabled="true" visible="true" x="62" y="66" width="196" height="22" index="0" />
                      </XCUIElementTypeButton>
                      <XCUIElementTypeButton type="XCUIElementTypeButton" name="Logout" label="Logout" id="Logout" enabled="true" accessible="true" visible="true" x="321" y="47" width="69" height="60" index="2" />
                      <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="107" width="390" height="60" index="3">
                        <XCUIElementTypeButton type="XCUIElementTypeButton" label="" enabled="true" accessible="true" visible="true" x="15" y="121" width="32" height="32" index="0" />
                        <XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="Security Check" name="Security Check" label="Security Check" id="Security Check" enabled="true" accessible="true" visible="true" x="62" y="128" width="320" height="18" index="1" />
                      </XCUIElementTypeOther>
                      <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="167" width="390" height="593" index="4" />
                      <XCUIElementTypeWebView type="XCUIElementTypeWebView" label="" enabled="true" visible="true" x="0" y="167" width="390" height="593" index="5">
                        <XCUIElementTypeWebView type="XCUIElementTypeWebView" label="" enabled="true" visible="true" x="0" y="167" width="390" height="593" index="0">
                          <XCUIElementTypeWebView type="XCUIElementTypeWebView" label="" enabled="true" visible="true" x="0" y="167" width="390" height="593" index="0">
                            <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="593" index="0">
                              <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="593" index="0">
                                <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="167" width="390" height="593" index="0">
                                  <XCUIElementTypeOther type="XCUIElementTypeOther" name="User Profile" label="User Profile" id="User Profile" enabled="true" visible="true" x="0" y="167" width="390" height="593" index="0">
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="167" width="390" height="593" index="0">
                                      <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="167" width="390" height="593" index="0" />
                                      <XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="Since you are updating information associated with your Multi Factor Authentication Alerts, we need to verify your identity. Please enter your password below to continue." name="Since you are updating information associated with your Multi Factor Authentication Alerts, we need to verify your identity. Please enter your password below to continue." label="Since you are updating information associated with your Multi Factor Authentication Alerts, we need to verify your identity. Please enter your password below to continue." id="Since you are updating information associated with your Multi Factor Authentication Alerts, we need to verify your identity. Please enter your password below to continue." enabled="true" accessible="true" visible="true" x="25" y="191" width="340" height="70" index="1" />
                                      <XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="PASSWORD" name="PASSWORD" label="PASSWORD" id="PASSWORD" enabled="true" accessible="true" visible="true" x="20" y="304" width="64" height="14" index="2" />
                                      <XCUIElementTypeSecureTextField type="XCUIElementTypeSecureTextField" value="•••••••••" label="" enabled="true" accessible="true" visible="true" x="20" y="345" width="344" height="31" index="3" />
                                      <XCUIElementTypeButton type="XCUIElementTypeButton" name="CANCEL" label="CANCEL" id="CANCEL" enabled="true" accessible="true" visible="true" x="19" y="698" width="167" height="42" index="4" />
                                      <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="5" />
                                    </XCUIElementTypeOther>
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="1" />
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="2" />
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="3" />
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="4" />
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="5" />
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="6" />
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="7" />
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="8" />
                                    <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="0" height="0" index="9" />
                                  </XCUIElementTypeOther>
                                </XCUIElementTypeOther>
                              </XCUIElementTypeOther>
                            </XCUIElementTypeOther>
                          </XCUIElementTypeWebView>
                          <XCUIElementTypeOther type="XCUIElementTypeOther" value="0%" name="Horizontal scroll bar, 1 page" label="Horizontal scroll bar, 1 page" id="Horizontal scroll bar, 1 page" enabled="true" visible="true" x="0" y="727" width="390" height="30" index="1" />
                        </XCUIElementTypeWebView>
                      </XCUIElementTypeWebView>
                    </XCUIElementTypeOther>
                  </XCUIElementTypeOther>
                </XCUIElementTypeOther>
              </XCUIElementTypeOther>
            </XCUIElementTypeOther>
            <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="760" width="390" height="50" index="1">
              <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="760" width="390" height="50" index="0">
                <XCUIElementTypeWebView type="XCUIElementTypeWebView" label="" enabled="true" visible="true" x="0" y="760" width="390" height="50" index="0">
                  <XCUIElementTypeWebView type="XCUIElementTypeWebView" label="" enabled="true" visible="true" x="0" y="760" width="390" height="50" index="0">
                    <XCUIElementTypeWebView type="XCUIElementTypeWebView" label="" enabled="true" visible="true" x="0" y="760" width="390" height="50" index="0">
                      <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="50" index="0">
                        <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="50" index="0">
                          <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="760" width="390" height="50" index="0">
                            <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="760" width="390" height="50" index="0">
                              <XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="© 2020. All Rights Reserved. Federally Insured by NCUA." name="© 2020. All Rights Reserved. Federally Insured by NCUA." label="© 2020. All Rights Reserved. Federally Insured by NCUA." id="© 2020. All Rights Reserved. Federally Insured by NCUA." enabled="true" accessible="true" visible="true" x="77" y="770" width="236" height="29" index="0" />
                            </XCUIElementTypeOther>
                          </XCUIElementTypeOther>
                        </XCUIElementTypeOther>
                      </XCUIElementTypeOther>
                    </XCUIElementTypeWebView>
                    <XCUIElementTypeOther type="XCUIElementTypeOther" value="0%" name="Horizontal scroll bar, 1 page" label="Horizontal scroll bar, 1 page" id="Horizontal scroll bar, 1 page" enabled="true" visible="true" x="0" y="782" width="390" height="25" index="1" />
                  </XCUIElementTypeWebView>
                </XCUIElementTypeWebView>
              </XCUIElementTypeOther>
            </XCUIElementTypeOther>
          </XCUIElementTypeOther>
        </XCUIElementTypeOther>
      </XCUIElementTypeOther>
    </XCUIElementTypeWindow>
    <XCUIElementTypeWindow type="XCUIElementTypeWindow" label="" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="1">
      <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="0">
        <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="0" />
        <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="844" width="390" height="233" index="1" />
      </XCUIElementTypeOther>
    </XCUIElementTypeWindow>
    <XCUIElementTypeWindow type="XCUIElementTypeWindow" label="" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="2">
      <XCUIElementTypeOther type="XCUIElementTypeOther" label="" enabled="true" visible="true" x="0" y="0" width="390" height="844" index="0" />
    </XCUIElementTypeWindow>
  </XCUIElementTypeApplication>
</SCREEN>