You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue with getAttributes() where the enabled property of an element is being returned incorrectly. I have confirmed that this occurs on both Android and iOS. Using Appium Inspector and Layout Inspector, I verified that the element associated with this testID is disabled at that moment, but I cannot validate this with Detox. Could this be a bug, or am I possibly checking the enabled state for an incorrect view?
Appium inspector:
What was the expected behaviour?
In this example, my expectation is for the enabled property to return false.
Was it tested on latest Detox?
I have tested this issue on the latest Detox release and it still reproduces.
11-27 02:15:59.263 30901 30956 D DetoxWSClient: Received action 'invoke' (ID #14, params={"target":{"type":"Class","value":"com.wix.detox.espresso.EspressoDetox"},"method":"perform","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForTestId","args":["common.hamburger.section.operation",{"type":"boolean","value":false}]}},{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxAction"},"method":"getAttributes","args":[]}}]})
11-27 02:15:59.263 30901 30952 I DetoxDispatcher: Handling action 'invoke' (ID #14)...
11-27 02:15:59.263 30901 30952 D Detox : class com.wix.detox.espresso.DetoxMatcher, matcherForTestId, [common.hamburger.section.operation, false]
11-27 02:15:59.264 30901 30952 D Detox : class com.wix.detox.espresso.DetoxAction, getAttributes, []
11-27 02:15:59.264 30901 30952 D Detox : class com.wix.detox.espresso.EspressoDetox, perform, [(view.getTag() is "common.hamburger.section.operation" and view has effective visibility <VISIBLE>), com.wix.detox.espresso.action.GetAttributesAction@768985b]
11-27 02:15:59.266 30901 30901 I ViewInteraction: Performing 'Get view attributes' action on view View at index #0, of those matching MATCHER(view.getTag() is "common.hamburger.section.operation" and view has effective visibility <VISIBLE>)
11-27 02:15:59.282 30901 30952 I UiAutomation: Initialized for user 0 on display 0
11-27 02:15:59.286 561 4265 D AccessibilityManagerService: changeCurrentUserForTestAutomationIfNeededLocked(0): ignoring because device doesn't support visible background users
11-27 02:15:59.286 561 4265 I UiAutomationManager: Registering UiTestAutomationService (id=com.android.server.accessibility/UiAutomation) when called by user 0
11-27 02:15:59.289 30901 30952 W DefaultFailureHandler: Failed to take screenshot
What happened?
I am encountering an issue with getAttributes() where the enabled property of an element is being returned incorrectly. I have confirmed that this occurs on both Android and iOS. Using Appium Inspector and Layout Inspector, I verified that the element associated with this testID is disabled at that moment, but I cannot validate this with Detox. Could this be a bug, or am I possibly checking the enabled state for an incorrect view?
Appium inspector:
What was the expected behaviour?
In this example, my expectation is for the enabled property to return false.
Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
In what environment did this happen?
Detox version: 20.28.0
React Native version: 0.72.5
Has Fabric (React Native's new rendering system) enabled: no
Node version: 18.20.4
Device model: Pixel 7a
Android version: Android 15.0 arm64-v8a
Test-runner: jest
Detox logs
Detox logs for getAttributes()
console.log(JSON.stringify(await element(by.id(ElementIds.HamburgerMenu.operationSection)).getAttributes(), null, 2))Device logs
Device logs
More data, please!
When I use with await enabled is always true
await element(by.id(ElementIds.HamburgerMenu.operationSection)).getAttributes();
No response
The text was updated successfully, but these errors were encountered: