Skip to content

TypeText.writeText is crashing on Android 13 #1425

@idyatlov

Description

@idyatlov

Describe the bug
Due to the recent renaming of the mIInputContext field to mFallbackInputConnection, everything crashes when trying to write text on Android 13.

How to reproduce
Launch any test with TextFieldElement.write(text) on Android 13

Expected behavior
Everything should work as expected

Screenshots
No need

Environment:
Android 13 and later

Starcktrace
Caused by: java.lang.NoSuchFieldException: No field mIInputContext in class Landroid/view/inputmethod/InputMethodManager; (declaration of ‘android.view.inputmethod.InputMethodManager’ appears in /system/framework/framework.jar!classes3.dex) at java.lang.Class.getDeclaredField(Native Method) at com.avito.android.test.util.ReflectionKt.getFieldByReflectionWithAnyField(Reflection.kt:10) at com.avito.android.test.element.field.actions.TypeText.writeText(TypeText.kt:78) at com.avito.android.test.element.field.actions.TypeText.perform(TypeText.kt:53) at com.avito.android.test.interceptor.ActionInterceptor$Proxy.perform(Interceptor.kt:29) at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:2) at androidx.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:25) at androidx.test.espresso.ViewInteraction.-$$Nest$mdoPerform(Unknown Source:0) at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:7) at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions