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.
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))
12:25:29.721 detox[9681] �[90mi�[39m s_glBindAttribLocation: bind attrib 0 name position
s_glBindAttribLocation: bind attrib 1 name color
s_glBindAttribLocation: bind attrib 2 name localCoord
12:25:29.753 detox[9680] �[90mi�[39m get
data: {"messageId":63,"type":"invokeResult","params":{"result":{"identifier":"common.hamburger.section.operation","visibility":"visible","visible":true,"label":"undefined.rnText","alpha":1,"elevation":0,"frame":{"x":0,"y":322,"width":912,"height":147},"height":147,"width":912,"focused":false,"enabled":true}}}
12:25:29.753 detox[9680] �[90mi�[39m send
data: {
"messageId": 63,
"type": "invokeResult",
"params": {
"result": {
"identifier": "common.hamburger.section.operation",
"visibility": "visible",
"visible": true,
"label": "undefined.rnText",
"alpha": 1,
"elevation": 0,
"frame": {
"x": 0,
"y": 322,
"width": 912,
"height": 147
},
"height": 147,
"width": 912,
"focused": false,
"enabled": true
}
}
}
12:25:29.753 detox[9681] �[90mi�[39m get message
data: {"messageId":63,"type":"invokeResult","params":{"result":{"identifier":"common.hamburger.section.operation","visibility":"visible","visible":true,"label":"undefined.rnText","alpha":1,"elevation":0,"frame":{"x":0,"y":322,"width":912,"height":147},"height":147,"width":912,"focused":false,"enabled":true}}}
12:25:29.753 detox[9681] �[90mE�[39m get element attributes
12:25:29.754 detox[9681] �[90mi�[39m {"identifier":"common.hamburger.section.operation","visibility":"visible","visible":true,"label":"undefined.rnText","alpha":1,"elevation":0,"frame":{"x":0,"y":322,"width":912,"height":147},"height":147,"width":912,"focused":false,"enabled":true}
12:25:29.755 detox[9681] �[90mi�[39m Failed to verify state 'disabled' for element '[{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForAnd","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForClass","args":["android.view.ViewGroup"]}},{"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.DetoxMatcher"},"method":"matcherForText","args":["TAŞIMA FAALİYETLERİM",{"type":"boolean","value":false}]}}]': Error: Element is not disabled: [{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForAnd","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForClass","args":["android.view.ViewGroup"]}},{"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.DetoxMatcher"},"method":"matcherForText","args":["TAŞIMA FAALİYETLERİM",{"type":"boolean","value":false}]}}]
at HamburgerMenu.<anonymous> (/Users/erdem.kilic/Desktop/lastmile-courier-app/e2e/base/BasePage.ts:60:19)
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Users/erdem.kilic/Desktop/lastmile-courier-app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
at _next (/Users/erdem.kilic/Desktop/lastmile-courier-app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
12:25:29.755 detox[9681] �[90mB�[39m onTestFnFailure
args: ({"error":{}})
12:25:29.755 detox[9681] �[90mE�[39m onTestFnFailure
12:25:29.756 detox[9681] �[90mE�[39m test_fn
error: Error: Element is not disabled: [{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForAnd","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForClass","args":["android.view.ViewGroup"]}},{"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.DetoxMatcher"},"method":"matcherForText","args":["TAŞIMA FAALİYETLERİM",{"type":"boolean","value":false}]}}]
at HamburgerMenu.<anonymous> (/Users/erdem.kilic/Desktop/lastmile-courier-app/e2e/base/BasePage.ts:60:19)
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Users/erdem.kilic/Desktop/lastmile-courier-app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
at _next (/Users/erdem.kilic/Desktop/lastmile-courier-app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
12:25:29.756 detox[9681] �[90mB�[39m afterEach
12:25:29.756 detox[9681] �[90mB�[39m terminateApp
args: ()
12:25:29.756 detox[9681] �[90mB�[39m onBeforeTerminateApp
args: ({"deviceId":"emulator-5554","bundleId":"com.trendyolexpress.lastmile.courier.staging"})
12:25:29.757 detox[9681] �[90mE�[39m onBeforeTerminateApp
12:25:29.758 detox[9681] �[90mi�[39m sending SIGINT to: /Users/erdem.kilic/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:54266 -e detoxSessionId 919e83ac-d552-816b-97cb-3baec86e2e22 -e mockDate 'MjAyNC0xMS0yMA==' -e mockIsSunday 'ZmFsc2U=' -e debug false com.trendyolexpress.lastmile.courier.staging.test/androidx.test.runner.AndroidJUnitRunner
12:25:29.760 detox[9681] �[90mi�[39m /Users/erdem.kilic/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:54266 -e detoxSessionId 919e83ac-d552-816b-97cb-3baec86e2e22 -e mockDate 'MjAyNC0xMS0yMA==' -e mockIsSunday 'ZmFsc2U=' -e debug false com.trendyolexpress.lastmile.courier.staging.test/androidx.test.runner.AndroidJUnitRunner terminated with SIGINT
12:25:29.760 detox[9681] �[90mi�[39m "/Users/erdem.kilic/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "am force-stop com.trendyolexpress.lastmile.courier.staging"
12:25:29.763 detox[9681] �[90mi�[39m "/Users/erdem.kilic/Library/Android/sdk/platform-tools/adb" -s emulator-5554 reverse --remove tcp:54266
12:25:29.828 detox[9681] �[90mi�[39m
12:25:29.840 detox[9681] �[90mi�[39m
12:25:29.841 detox[9681] �[90mB�[39m onTerminateApp
args: ({"deviceId":"emulator-5554","bundleId":"com.trendyolexpress.lastmile.courier.staging"})
12:25:29.841 detox[9681] �[90mE�[39m onTerminateApp
12:25:29.841 detox[9681] �[90mE�[39m terminateApp
12:25:29.841 detox[9681] �[90mE�[39m afterEach
12:25:29.841 detox[9681] �[90mB�[39m afterEach
12:25:29.908 detox[9681] �[90mi�[39m Emulator time successfully synced with real time.
12:25:29.909 detox[9681] �[90mE�[39m afterEach
12:25:29.909 detox[9681] �[90mB�[39m onTestDone
Device logs
Device logs
01-16 18:03:05.610 20287 20347 D DetoxWSClient: Received action 'invoke' (ID #24, 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":[]}}]})
01-16 18:03:05.610 20287 20343 I DetoxDispatcher: Handling action 'invoke' (ID #24)...
01-16 18:03:05.610 20287 20343 D Detox : class com.wix.detox.espresso.DetoxMatcher, matcherForTestId, [common.hamburger.section.operation, false]
01-16 18:03:05.610 20287 20343 D Detox : class com.wix.detox.espresso.DetoxAction, getAttributes, []
01-16 18:03:05.611 20287 20343 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@eab4832]
01-16 18:03:05.615 20287 20287 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>)
01-16 18:03:05.628 20287 20343 I UiAutomation: Initialized for user 0 on display 0
01-16 18:03:05.630 536 1055 D AccessibilityManagerService: changeCurrentUserForTestAutomationIfNeededLocked(0): ignoring because device doesn't support visible background users
01-16 18:03:05.631 536 1055 I UiAutomationManager: Registering UiTestAutomationService (id=com.android.server.accessibility/UiAutomation) when called by user 0
01-16 18:03:05.632 536 1055 W WindowMagnificationMgr: requestConnection duplicated request: connect=false, mConnectionState=DISCONNECTED
01-16 18:03:05.633 536 536 D BatterySaverPolicy: accessibility changed to true, updating policy.
01-16 18:03:05.635 20287 20453 V UiAutomation: Init UiAutomation@63adadf[id=25, displayId=0, flags=0]
01-16 18:03:05.637 20287 20287 D takeScreenshot: Found 1 global views to redraw
01-16 18:03:05.657 536 1056 D WindowManager: captureDisplay
01-16 18:03:05.662 159 159 I hwservicemanager: getTransport: Cannot find entry [email protected]::IMapper/default in either framework or device VINTF manifest.
01-16 18:03:05.663 20273 20285 I Gralloc4: mapper 4.x is not supported
01-16 11:15:38.024 158 158 I servicemanager: Could not find android.hardware.graphics.allocator.IAllocator/default in the VINTF manifest.
01-16 18:03:05.676 20273 20456 D libEGL : loaded /vendor/lib64/egl/libEGL_emulation.so
01-16 18:03:05.676 20273 20456 D libEGL : loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
01-16 18:03:05.677 20273 20456 D libEGL : loaded /vendor/lib64/egl/libGLESv2_emulation.so
01-16 18:03:05.687 20273 20456 W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
01-16 18:03:05.687 20273 20456 W OpenGLRenderer: Failed to initialize 101010-2 format, error = EGL_SUCCESS
01-16 18:03:05.707 20287 20343 E ActivityThread: Failed to find provider info for androidx.test.services.storage.outputfiles
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: Failed to take screenshot
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: androidx.test.services.storage.TestStorageException: No content provider registered for: content://androidx.test.services.storage.outputfiles/view-op-error-1.png. Are all test services apks installed?
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.services.storage.internal.TestStorageUtil.makeContentProviderClient(TestStorageUtil.java:116)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.services.storage.internal.TestStorageUtil.getOutputStream(TestStorageUtil.java:95)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.services.storage.TestStorage.openOutputFile(TestStorage.java:255)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.services.storage.TestStorage.openOutputFile(TestStorage.java:235)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.core.graphics.BitmapStorage.writeToTestStorage(BitmapStorageExt.kt:49)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.core.graphics.BitmapStorage.writeToTestStorage(BitmapStorageExt.kt:36)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.espresso.base.DefaultFailureHandler.takeScreenshot(DefaultFailureHandler.java:130)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:110)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:385)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:212)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:140)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.detox.espresso.performer.MultipleViewsActionPerformer.performOn(MultipleViewsActionPerformer.kt:23)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.detox.espresso.EspressoDetox.perform(EspressoDetox.java:42)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at java.lang.reflect.Method.invoke(Native Method)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at org.apache.commons.lang3.reflect.MethodUtils.invokeStaticMethod(Unknown Source:15)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at org.apache.commons.lang3.reflect.MethodUtils.invokeStaticMethod(Unknown Source:21)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.invoke.types.ClassTarget.execute(ClassTarget.java:23)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.invoke.types.Target.invoke(Target.java:59)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.invoke.MethodInvocation.invoke(MethodInvocation.java:35)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.invoke.MethodInvocation.invoke(MethodInvocation.java:26)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.invoke.MethodInvocation.invoke(MethodInvocation.java:20)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.detox.adapters.server.InvokeActionHandler.handle(DetoxActionHandlers.kt:54)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.detox.adapters.server.ActionsExecutor.executeAction$lambda$2$lambda$1(DetoxActionsDispatcher.kt:76)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.detox.adapters.server.ActionsExecutor.$r8$lambda$LZ3KRuVesIYkeXHJoNMi_yqw1HU(DetoxActionsDispatcher.kt:0)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.detox.adapters.server.ActionsExecutor$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:0)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at android.os.Handler.handleCallback(Handler.java:958)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at android.os.Handler.dispatchMessage(Handler.java:99)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at android.os.Looper.loopOnce(Looper.java:205)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at android.os.Looper.loop(Looper.java:294)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.detox.adapters.server.ActionsExecutor._init_$lambda$0(DetoxActionsDispatcher.kt:62)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.detox.adapters.server.ActionsExecutor.$r8$lambda$4eWOlZMqOQq2jbqiFbTCEP-pHOY(DetoxActionsDispatcher.kt:0)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at com.wix.detox.adapters.server.ActionsExecutor$$ExternalSyntheticLambda1.run(R8$$SyntheticClass:0)
01-16 18:03:05.707 20287 20343 W DefaultFailureHandler: at java.lang.Thread.run(Thread.java:1012)
01-16 18:03:05.715 536 1056 D CompatibilityChangeReporter: Compat change id reported: 149924527; UID 11925; state: ENABLED
01-16 18:03:05.715 536 1056 D CompatibilityChangeReporter: Compat change id reported: 132649864; UID 11925; state: DISABLED
01-16 18:03:05.717 20287 20343 D FileTestStorage: openOutputFile from /storage/emulated/0/Android/media/com.trendyolexpress.lastmile.courier.staging/additionalTestOutputDir/view-hierarchy-1.txt
01-16 18:03:05.722 1341 1642 W MediaProvider: isAppCloneUserPair for user 0: false
01-16 18:03:05.726 20287 20343 W ViewHierarchyExceptionHandler: The complete view hierarchy is available in artifact file 'view-hierarchy-1.txt'.
01-16 18:03:05.729 20287 20343 I DetoxWSClient: Sending out action 'invokeResult' (ID #24)
01-16 18:03:05.729 20287 20343 I DetoxDispatcher: Done with action 'invoke'
01-16 18:03:05.760 20287 20453 V UiAutomation: Init UiAutomation@63adadf[id=-1, displayId=0, flags=0]
01-16 18:03:05.761 536 1055 W WindowMagnificationMgr: requestConnection duplicated request: connect=false, mConnectionState=DISCONNECTED
01-16 18:03:05.761 536 1055 V UiAutomationManager: UiAutomation service owner died
01-16 18:03:05.761 536 536 D BatterySaverPolicy: accessibility changed to false, updating policy.
01-16 18:03:05.816 536 4461 I ActivityManager: Force stopping com.trendyolexpress.lastmile.courier.staging appid=11925 user=0: from pid 20459
01-16 18:03:05.816 536 554 D DisplayManagerService: Drop pending events for gone uid 11925
01-16 18:03:05.816 536 4461 I ActivityManager: Killing 20287:com.trendyolexpress.lastmile.courier.staging/u0a1925 (adj 0): stop com.trendyolexpress.lastmile.courier.staging due to from pid 20459
01-16 18:03:05.817 536 4461 W ActivityTaskManager: Force removing ActivityRecord{a439ff0 u0 com.trendyolexpress.lastmile.courier.staging/com.trendyolexpress.lastmile.courier.MainActivity t676 f}}: app died, no saved state
01-16 18:03:05.818 741 782 V WindowManagerShell: Transition requested: android.os.BinderProxy@d9520a5 TransitionRequestInfo { type = CLOSE, triggerTask = TaskInfo{userId=0 taskId=676 displayId=0 isRunning=false baseIntent=Intent { act=android.intent.action.MAIN flg=0x14000000 cmp=com.trendyolexpress.lastmile.courier.staging/com.trendyolexpress.lastmile.courier.MainActivity } baseActivity=null topActivity=null origActivity=null realActivity=ComponentInfo{com.trendyolexpress.lastmile.courier.staging/com.trendyolexpress.lastmile.courier.MainActivity} numActivities=0 lastActiveTime=88312344 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@d0f5c7a} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=null topActivityInfo=null launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isVisibleRequested=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false topActivityLetterboxed= false isFromDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}, remoteTransition = null, displayChange = null }
01-16 18:03:05.818 536 562 I UsageStatsService: Time changed in by 24447 seconds
01-16 18:03:05.819 536 4461 W ActivityManager: Crash of app com.trendyolexpress.lastmile.courier.staging running instrumentation ComponentInfo{com.trendyolexpress.lastmile.courier.staging.test/androidx.test.runner.AndroidJUnitRunner}
01-16 18:03:05.819 536 4461 I ActivityManager: Force stopping com.trendyolexpress.lastmile.courier.staging appid=11925 user=0: finished inst
01-16 18:03:05.819 536 20462 E IPCThreadState: Binder transaction failure: 4047482/29189/-22
01-16 18:03:05.819 536 20462 I ActivityManager: Failure reporting to instrumentation watcher: comp=ComponentInfo{com.trendyolexpress.lastmile.courier.staging.test/androidx.test.runner.AndroidJUnitRunner} results=Bundle[{shortMsg=Process crashed.}]
More data, please!
I also needed to add the following line to the ProGuard file for the getAttributes method to work in release mode.
-keep class com.google.common.util.concurrent.** { *; }
No response
The text was updated successfully, but these errors were encountered:
erdemkiiliic
changed the title
Incorrect enabled prop from getAttributes() in Detox for disabled elements
Incorrect enabled prop from getAttributes() for disabled elements in SectionList
Jan 16, 2025
erdemkiiliic
changed the title
Incorrect enabled prop from getAttributes() for disabled elements in SectionList
Incorrect enabled prop from getAttributes() for disabled elements (custom buttons)
Jan 16, 2025
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!
here is the custom button:
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!
I also needed to add the following line to the ProGuard file for the getAttributes method to work in release mode.
-keep class com.google.common.util.concurrent.** { *; }
No response
The text was updated successfully, but these errors were encountered: