Karishma
Karishma

Reputation: 33

Assert on bootstrap angular alert when using protractor and cucumberJS

I am using protractor , cucumberJS and chai-as-promised.

I have a message (bootstrap alert of angularJS) that appears in DOM when a button is clicked on. It completely disappears from DOM after 6000 ms.

I was trying to assert that the expected message string has appeared.

This is how it looks in the DOM :-

<div style="text-align: center; margin: 10px 0px;" class="alert alert-success ng-scope" ng-show="postOrSaveSuccMsg != ''" ng-if="postOrSaveSuccMsg != ''">
            <a class="alert-link ng-binding" href="#">Archived successfully.</a>
        </div>

Would anyone kindly help me with this?

Upvotes: 0

Views: 90

Answers (1)

Jesus Lopez
Jesus Lopez

Reputation: 1

I was able to fix my problem by using:

browser.ignoreSynchronization = true;

Before attempting to get the message.

Regards,

Upvotes: 0

Related Questions