Issue
I am automating accessibility testing with espresso, but it reports that androidx.test.espresso.contrib.AccessibilityChecks
as deprecated.
I surfed the internet and found the non-deprecated AccessibilityChecks
class which should be used instead. But would be appreciate if anyone can provide the non-deprecated gradle dependency
This is my testing class
import androidx.test.espresso.contrib.AccessibilityChecks;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class AccessibilityChecksTest {
@BeforeClass
public static void turnOnAccessibility() {
AccessibilityChecks.enable();
}
}
Dependency
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
Solution
The below is the right dependency for the non-deprecated AccessibilityChecks
I found it here along with many other Espresso
testing APIs
androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.2.0'
Answered By - Zain
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.