Posts

Post not yet marked as solved
0 Replies
465 Views
I have a macOS UI in which some UI Elements have tooltips. When you hover over a UI Element, (that has a tooltip), with the mouse for a couple seconds, a "tooltip" is presented for about 10 seconds. I would like to verify that the tooltip strings are correct. In an attempt to see what the view hierarchy contains when a tooltip is being presented, I included the following code in a test: uiElement.hover() sleep(5) print(app.debugDescription) When this code runs, I can see the mouse hover over the UI Element, and after a couple seconds, I see the tooltip presented, then the code prints the view hierarchy to the console. ...however, the tooltip string is nowhere to be found in the view hierarchy. It appears that there is currently no way to validate the correctness of tooltips in XCUITest. Am I wrong?
Posted
by Avantjer.
Last updated
.
Post not yet marked as solved
0 Replies
242 Views
There doesn't seem to be a way, (from XCUITest), to determine whether a MacOS button is the "default" button. This is something that you might like to verify to determine that the UI is set up correctly. ...also, the "default" button can be optionally clicked, or the Return key can be typed, so it would be good to know, at a testing level, whether a particular button is considered "default" so that you can test both paths. Would be great if, in addition to "isHittable", "isEnabled", "isSelected", there was an "isDefault". I thought that maybe "isSelected" would do the trick, but "isSelected" returns false for a "default" button. Is there some way that I'm not aware of? Thanks!
Posted
by Avantjer.
Last updated
.