-1

Overnight my ui tests stopped working all of a sudden:

Line in barista clickOn(R.id.myView) throws:

com.schibsted.spain.barista.internal.failurehandler.BaristaException: Could not perform action single click on view with id: [...]   
[...]   
Caused by: androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (is displayed on the screen to the user and with id: [...]

Line in Espresso onView(withId(R.id.myView)).perform(scrollTo(), click()) throws:

androidx.test.espresso.PerformException: Error performing 'single click - At Coordinates: 53, 1723 and precision: 16, 16' on view 'Animations or transitions are enabled on the target device.  
[...]   
Caused by: java.util.NoSuchElementException: List is empty.

I don't understand why this happens. I can see the view on screen during the test and espresso gave me some coordinates.

Edit:
Since it's a TextView I also tried Baristas clickOn(context.getString(R.string.myText)) but it throws:

com.schibsted.spain.barista.internal.failurehandler.BaristaException: Could not perform action single click on view with text: is [...]  
[...]   
Caused by: androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (is displayed on the screen to the user and with text: is [...]
<TextView
   android:id="@+id/myView"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:text="@string/myText"/>
000000000000000000000
  • 1,467
  • 1
  • 19
  • 38
  • Can you try again with Window / Transition Animation Scale set to Off? From this [SO post](https://stackoverflow.com/questions/43751079/espresso-testing-disable-animation)? –  Nov 08 '19 at 09:05
  • I did that, however it doesn't change anything. There are no layout changes or animations in this fragment. – 000000000000000000000 Nov 08 '19 at 09:30

1 Answers1

0

The error is unrelated to Espresso or Barista.
java.util.NoSuchElementException: List is empty was thrown in the OnClickListener of the view.

000000000000000000000
  • 1,467
  • 1
  • 19
  • 38