06-08-2022 7:51 AM - edited 06-08-2022 7:51 AM
07-06-2022 10:06 PM - edited 07-09-2022 10:22 PM
Is there any way to locate MessageBox (or Message Toast)? I have tried the following code, but the both were unsuccessful.
//1. Using controlType
const messageBox = await browser.asControl({
controlType: "sap.m.MessageBox",
viewName: Main._viewName
})
//2. Using i18NText
const messageBox = await browser.asControl({
selector: {
i18NText: {
propertyName: "text",
key: "message"
},
viewName: Main._viewName
}
})
07-07-2022 10:58 AM
07-09-2022 10:23 PM
07-11-2022 8:43 AM
07-11-2022 12:55 PM
Unfortunately, not. When debugging, the following message or object is set to messageBox.
const messageBox = await browser.asControl({
controlType: "sap.m.MessageBox",
viewName: Main._viewName
})
messageBox: 'ERROR: Specified selector is not valid -> abort'
const messageBox = await browser.asControl({
selector: {
i18NText: {
propertyName: "text",
key: "message"
},
viewName: Main._viewName
messageBox.getControlInfo()
{$: undefined, id: undefined, methods: undefined, className: undefined, key: undefined}
07-09-2022 2:45 PM
A late one but maybe interesting for others because
https://github.com/SAP-samples/sap-community-code-challenge-ui5/pull/49
07-11-2022 9:16 AM