Sapui5 sap.ui.commons.MessageBox的OPA匹配器
我怎样才能抓住一个留言盒 我试过这个代码,但不起作用Sapui5 sap.ui.commons.MessageBox的OPA匹配器,sapui5,Sapui5,我怎样才能抓住一个留言盒 我试过这个代码,但不起作用 iShouldSeeConfirmPopup: function(sTitle) { return this.waitFor({ controlType: "sap.ui.commons.MessageBox", matchers: function(oControl) { return oControl.getTitle() === sTitle;
iShouldSeeConfirmPopup: function(sTitle) {
return this.waitFor({
controlType: "sap.ui.commons.MessageBox",
matchers: function(oControl) {
return oControl.getTitle() === sTitle;
},
success: function(oControls) {
ok(true, "I see a confirm popup");
},
errorMessage: "Did not find confirmation popup"
});
}
我看了一下MessageBox的API。但是,我认为它不支持getTitle()
请教我。谢谢 尝试使用“sap.ui.commons.Dialog”作为匹配器的控件类型
return this.waitFor({
pollingInterval : 100,
viewName : "sap.ui.commons.MessageBox",
check : function () {
return !!sap.ui.test.Opa5.getJQuery()(".MessageBox").length;
},
success : function () {
ok(true, "I see a confirm popup");
},
errorMessage : "Did not find confirmation popup"
});
commons MessageBox似乎是commons对话框的一个实例,
请参阅使用UI5控制台插件不幸的是,该UI是由另一个没有类的家伙构建的。所以,我不能用这种方式。还有别的解决办法吗?