android.support.test.espresso.base.DefaultFailureHandler$AssertionFailedWithCauseError: 'with text: is "Mock String"' doesn't match the selected view. Expected: with text: is "Mock String" Got: "AppCompatTextView{id=2131427413, res-name=tv_text_data, visibility=VISIBLE, width=183, height=38, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=32.0, y=128.0, text=Release String, input-type=0, ime-target=false, has-links=false}"

Stack Overflow | Mes | 2 months ago
  1. 0

    Espresso test is not working as expected

    Stack Overflow | 2 months ago | Mes
    android.support.test.espresso.base.DefaultFailureHandler$AssertionFailedWithCauseError: 'with text: is "Mock String"' doesn't match the selected view. Expected: with text: is "Mock String" Got: "AppCompatTextView{id=2131427413, res-name=tv_text_data, visibility=VISIBLE, width=183, height=38, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=32.0, y=128.0, text=Release String, input-type=0, ime-target=false, has-links=false}"
  2. 0

    Espresso 'is enabled' doesn't match the selected view

    Stack Overflow | 2 years ago | user1007522
    junit.framework.AssertionFailedError: 'is enabled' doesn't match the selected view. Expected: is enabled Got: "Button{id=2131296458, res-name=fragment_vote_pause_btn, visibility=INVISIBLE, width=329, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=false, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=375.0, y=649.0, text=Tap to play or pause, input-type=0, ime-target=false, has-links=false}"
  3. 0

    Espresso withText in TextView Doesn't match selected View

    Stack Overflow | 2 years ago
    junit.framework.AssertionFailedError: 'with string from resource id: <2131099772>' doesn't match the selected view. Expected: with string from resource id: <2131099772>[my_content] value: Test Content Available Got: "TextView{id=2131296340, res-name=dialog_content, visibility=VISIBLE, width=620, height=38, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Test Content Available, input-type=0, ime-target=false}"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Espresso withText in TextView Doesn't match selected View

    Stack Overflow | 2 years ago
    junit.framework.AssertionFailedError: 'with string from resource id: &lt;2131099772&gt;' doesn't match the selected view. Expected: with string from resource id: &lt;2131099772&gt;[my_content] value: Test Content Available Got: "TextView{id=2131296340, res-name=dialog_content, visibility=VISIBLE, width=620, height=38, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Test Content Available, input-type=0, ime-target=false}"
  6. 0

    Flaky problems with Espresso in Android Studio

    Google Groups | 3 years ago | R Palan
    com.google.android.apps.common.testing.ui.espresso.base.DefaultFailureHandler$AssertionFailedWithCauseError: 'with text: is "Hide Me"' doesn't match the selected view. Expected: with text: is "Hide Me" Got: "EditText{id=2131165245, res-name=hideText, visibility=VISIBLE, width=704, height=79, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=true, is-focusable=true, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=true, editor-info=[inputType=0x20001 imeOptions=0x4c000005 privateImeOptions=null actionLabel=null actionId=0 initialSelStart=0 initialSelEnd=0 initialCapsMode=0x0 hintText=null label=null packageName=null fieldId=0 fieldName=null extras=null ], x=32.0, y=174.0, text=Hide me, input-type=131073, ime-target=true}"

  1. Ábó Szilágyi 1 times, last 8 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. junit.framework.AssertionFailedError

    'with text: is "Mock String"' doesn't match the selected view. Expected: with text: is "Mock String" Got: "AppCompatTextView{id=2131427413, res-name=tv_text_data, visibility=VISIBLE, width=183, height=38, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=32.0, y=128.0, text=Release String, input-type=0, ime-target=false, has-links=false}"

    at android.support.test.espresso.matcher.ViewMatchers.assertThat()
  2. android.support.test
    ViewInteraction$2.run
    1. android.support.test.espresso.matcher.ViewMatchers.assertThat(ViewMatchers.java:1053)
    2. android.support.test.espresso.assertion.ViewAssertions$2.check(ViewAssertions.java:89)
    3. android.support.test.espresso.ViewInteraction$2.run(ViewInteraction.java:170)
    3 frames
  3. Java RT
    FutureTask.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:237)
    2 frames
  4. Android Platform
    ActivityThread.main
    1. android.os.Handler.handleCallback(Handler.java:733)
    2. android.os.Handler.dispatchMessage(Handler.java:95)
    3. android.os.Looper.loop(Looper.java:136)
    4. android.app.ActivityThread.main(ActivityThread.java:5086)
    4 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:515)
    2 frames
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    2 frames
  7. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame