Skip to Content
0
Jul 11, 2018 at 08:35 PM

OPA Page Can't Find View

199 Views Last edit Jul 11, 2018 at 08:41 PM 3 rev

I'm new to OPA testing, and have been able to get the 'plumbing' to work, but when I add the 'viewName' tag to the actions or assertions structure in the CreatePageObjects function of my page file (please see below), the OPA test claims it can't find the view. When I remove the 'viewName' tag, the function below works.

  1. Are the view names fully qualified?
  2. Do I need to set a resourceroot in the opaTest.qunit.html file?

Thank you in advance for your help!

Opa5.createPageObjects({
	duringRegionApplicationTest: {


		actions: {
			iPressTheAddButton: function () {
				return this.waitFor({
                                        viewName: "Region",
					controlType: "sap.m.Button",
					success: function (aButtons) {
						aButtons[0].$().trigger("tap");
					},
					errorMessage: "Did not find the Add button on the app page"
				});
			}
		},
		assertions: {
			iShouldSeeTheAddDialog: function () {
				return this.waitFor({
					controlType: "sap.m.Dialog",
					success: function () {
						Opa5.assert.ok(true, "The dialog is open");
					},
					errorMessage: "Did not find the dialog control"
				});
			}
		}
	}
});