Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3019

Re: OPA matcher for sap.ui.commons.MessageBox

$
0
0

There is no control type as sap.ui.commons.MessageBox. You'll have to find the css classes that MessageBox uses and try to fetch the instance using the class selector. Below is a sample code that I used as matcher for sap.m.MessageBox success.

 

fnShouldSeeSuccessMessage : function(sViewName,sSuccessMessage,sErrorMessage){       return this.waitFor({      pollingInterval : 100,      viewName : sViewName,      check : function(){                      return !!sap.ui.test.Opa5.getJQuery()(".sapMMessageBoxSuccess").length && sap.ui.test.Opa5.getJQuery()(".sapMMessageBoxSuccess").find(".sapMText").text() === sSuccessMessage;
},      success : function(oMessagebox){                         ok (true, sSuccessMessage);                       },      errorMessage : sErrorMessage      });
},

Viewing all articles
Browse latest Browse all 3019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>