HomeiOS Developmentios - The best way to inform if a UIButton has a...

ios – The best way to inform if a UIButton has a picture set in XCUI


I am dealing with a problem the place I want to have the ability to decide if a UIButton that capabilities as a hyperlink has a picture in its imageView utilizing simply XCUI properties.

This is a couple of issues that I’ve tried:

  • accessing the accessibilityValue… it was nil which wasn’t an enormous shock since I did not set one, however after studying this someplace I simply needed to attempt it simply in case.

  • accessing the button’s kids – there have been no kids accessible, which makes me suppose that UIButton’s subviews have to be personal in XCUI.. after I print XCUIApplication() within the console in Xcode the button’s subviews aren’t listed, the button portion of the hierarchy does not go any deeper than simply the button itself

If anybody has any concepts or tips on how this could possibly be achieved I might be very grateful! Thanks!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments