Summary:
The hasFocusXCUIElementAttribute is only available on tvOS. This would be very handy to have access too on other OS's, particularly on macOS.
Steps to Reproduce:
When running an XCUITest against a macOS app, attempt to access the hasFocus property on an XCUIElement. Note that it is not accessible, but other properties such as isEnabled are accessible.
Expected Results:
Expected to be able to access the hasFocus property on an XCUIElement.
Actual Results:
Unable to access the hasFocus property on the XCUIElement.
Version/Build:
Xcode 10.2 (10E125)
Notes:
I was able to deduce that hasFocus is only available on tvOS be looking at the XCUIElementAttributes.h file, where on line 69 we have:
#if TARGET_OS_TV
/*! Whether or not the elment has UI focus. */
@property (readonly) BOOL hasFocus;
#endif
Another solution to this issue would be to simply update the documentation to mention that this property is only available on tvOS. This is less preferable, but would at least solve part of the problem.
Description
Summary: The
hasFocus
XCUIElementAttribute
is only available on tvOS. This would be very handy to have access too on other OS's, particularly on macOS.Steps to Reproduce: When running an XCUITest against a macOS app, attempt to access the
hasFocus
property on an XCUIElement. Note that it is not accessible, but other properties such asisEnabled
are accessible.Expected Results: Expected to be able to access the
hasFocus
property on an XCUIElement.Actual Results: Unable to access the
hasFocus
property on the XCUIElement.Version/Build: Xcode 10.2 (10E125)
Notes: I was able to deduce that
hasFocus
is only available on tvOS be looking at theXCUIElementAttributes.h
file, where on line 69 we have:Another solution to this issue would be to simply update the documentation to mention that this property is only available on tvOS. This is less preferable, but would at least solve part of the problem.
- Product Version: Xcode 10.2 (10E125) Created: 2019-04-16T20:01:57.493479 Originated: 2019-04-16T00:00:00 Open Radar Link: http://www.openradar.me/49950847