我创建了此方法来检查预期的链接是否等于打开的链接:
fun assertOpenedUrl(url: String) {
val expectedIntent = allOf(hasAction(Intent.ACTION_VIEW), hasData(url))
intending(expectedIntent).respondWith(Instrumentation.ActivityResult(0, null))
intended(expectedIntent)
release()
}
但是我应该怎么做才能检查打开的链接是否包含子字符串?