本文介绍了sap.m.MessageToast.show调用的OPA匹配器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
sap.m.MessageToast.show
呼叫的OPA匹配模式如何?我查看了sap.m.MessageToast.show
的代码,并假定使用控制为sap.ui.core.Popup
.因此,我尝试了以下匹配器:
How does a OPA match pattern for a sap.m.MessageToast.show
call looks like?I looked into the Code of sap.m.MessageToast.show
and assumed the use control is sap.ui.core.Popup
. Therefore I tried the following matcher:
iShouldSeeAToastMessage : function() {
return this.waitFor({
controlType : "sap.ui.core.Popup",
success : function (aDialog) {
ok(true, "Found a Toast: " + aDialog[0]);
},
errorMessage : "No Toast message detected!"
});
},
controlType是否正确?匹配器部分的外观如何?
Is the controlType correct? How could the matcher section look like?
推荐答案
这应该有效:
return this.waitFor({
pollingInterval : 100,
viewName : "YOUR_VIEW_NAME_HERE",
check : function () {
return !!sap.ui.test.Opa5.getJQuery()(".sapMMessageToast").length;
},
success : function () {
ok(true, "Found a Toast");
},
errorMessage : "No Toast message detected!"
});
这篇关于sap.m.MessageToast.show调用的OPA匹配器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!