function checkPopUpButton(clickbtnId) {
            var doc = $(testWindow.document),
                errorPopUp = doc.find(".error-dialog.instance"),
                btn = errorPopUp.find('.dialog-button');

            // Test if the update bar button has been displayed.
            expect(btn.length).toBe(2);
            if (clickbtnId) {
                clickButton(clickbtnId);
            }
        }
Check the presence of a Button in Error Prompt
@param {String} btnId - "CANCEL" or "OPEN"