on 2020 Feb 11 1:47 AM
Hi experts,
I'm trying to test an app with OPA5.
App view loads component from custom library, and the component simply displays a button (sap.m.Button).
Below is controller's code loading the component.
this.getOwnerComponent().createComponent({
usage: "myButton",
settings: {},
componentData: {},
async: true
}).then(function(oComp) {
this.byId("box").addItem(new ComponentContainer({
id: "myButtonComp",
component: oComp
}));
}.bind(this)).catch(function(oError) {
MessageBox.error(oError.message);
});
The problem is, OPA5 doesn't recognize created component nor the button inside it.
iShouldSeeMyButton: function () {
return this.waitFor({
viewName: sViewName,
id: "myButtonComp",
success: function () {
Opa5.assert.ok(true, "The button is displayed");
},
errorMessage: "Did not find the button"
});
}
Above code didn't work even if I changed 'id: "myButtonComp" to 'controlType: "sap.m.Button"'.With UI5 inspector tool, I could see both the ComponentContainer and button exited.


Request clarification before answering.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.