Fixed
Status Update
Comments
as...@google.com <as...@google.com>
ap...@google.com <ap...@google.com> #2
You can provide your own regex to By.text()
.
For example, By.text(Pattern.compile("All albums.*", Pattern.DOTALL))
should be equivalent to a multi-line startsWith.
lo...@gmail.com <lo...@gmail.com> #3
I'm probably dumb but why would it be the default and wanted behavior if not documented properly?
Every known startWith / contains function in Java/Kotlin are multiline, the javadoc says: A UI element will be considered a match if its text value starts with the substring parameter
Many people will fall into this non standard default behavior and loose tons of time trying to figure out why.
If you still consider this default is the correct one, then please document it.
Description
Jetpack Compose version:
Jetpack Compose component used: compiler and runtime
Android Studio Build:
Kotlin version: 1.9.21
I encountered this crash upgrading Kotlin from 1.9.20 to 1.9.21. When I switched our project to Kotlin 1.9.21, one of our compositions started to crash.
I isolated the crash to this minimal sample:
This sample uses Molecule to start the composition in a test case. I don’t believe Molecule is necessary to reproduce this.
Stack trace (if applicable):
I believe the
return@run
lines are particularly problematic here. Replacing those lines withUnit
prevents the crash.I believe this is related to another bug from August 2021. https://issuetracker.google.com/issues/195242921