General¶
Android introduced ComposeViews
which have restricted lifetime to improve memory load and performance.
If the Android application uses ComposeView
the properties, or the element as a whole, can disappear from the Application Objects
view.
This can occur during recording and replaying of Squish for an Android application.
Workaround options¶
Use of other verification methods¶
If the customer uses the Application Objects
view to verify certain properties that are also visible on the screen (e.g. text, icons) OCR or image verification should be used as a replacement.
See this section of the Squish documentation.
Changing the behavior of ComposeViews¶
ComposeViews are disposed of when the View changes by default.
This can be adjusted using the Android API.
Please try to change the dispose strategy to DisposeOnViewTreeLifecycleDestroyed .
These change can help to prevent the disposition of the 'ComposeView' objects.