Wednesday, 14 February 2018

Espresso Check for the Youtube URL



//Using Espresso Intent to check whether the appropriate URL is openedIntents.init();
Matcher<Intent> expectedIntent = allOf(hasAction(Intent.ACTION_VIEW), hasData("req_url"));
intending(expectedIntent).respondWith(new Instrumentation.ActivityResult(0, null));
onView(withText(startsWith("Video"))).perform(click());
intended(expectedIntent);
Intents.release();

Add this dependency in build.gradle
androidTestCompile 'com.android.support.test.espresso:espresso-intents:3.0.1'

No comments:

Post a Comment

Pass a HashMap from Angular Client to Spring boot API

This example is for the case where fileData is very huge and in json format   let map = new Map<string, string>()      map.set(this.ge...