所以,我有一个AlertDialog,其中包含可选项列表。其中一个总是被选中。在仪器测试中,我想打开对话框并检查是否选择了具有特定文本的项目。我尝试使用以下代码段无效:
push.on('notification', (data) => {
this.ngZone.run(() => {
// update array
});
});
答案 0 :(得分:0)
I hope help full for you
ViewInteraction customTextView = onView(
allOf(withId(R.id.tv_switch), withText("Switch care"),
withParent(allOf(withId(R.id.ll_care),
withParent(withId(android.R.id.content)))),
isDisplayed()));
customTextView.perform(click());
ViewInteraction mDButton = onView(
allOf(withId(R.id.buttonDefaultPositive), withText("Continue"), isDisplayed()));
mDButton.perform(click());