Unresolved promise

Hi all,
on a website I have the following situation:
I enter a value in a field and click on a button afterwards. Depending on the validity of the input there will either show up an additional view or an alert pop up with an error message.

In this case I tried
Click ${OM_REFRESH_BTN}
${promise} = Promise To Wait For Alert action=accept
TRY
Wait For Elements State ${VISIBLE} state=visible
EXCEPT
${text} = Wait For ${promise}
Fail ${text}
END

Both branches of the TRY/EXCEPT block work so far except for the fact that the “promise” was not solved in the first block. Therefore I get the following messages:

WARN Waiting unresolved promises at the end of test ‘XXX’
ERROR Calling method ‘_end_test’ of listener ‘Browser’ failed: Error: page.waitForEvent: Target page, context or browser has been closed
=========================== logs ===========================
waiting for event “dialog”

Does anyone have an idea how this problem could be solved? I would be very delighted if someone could help!

I used the latest versions of RF and Browser Library.

if your - Wait For Elements State ${VISIBLE} state=visible - does not throw an exception, Wait For is never called and once the test finishes, you get that error of unresolved promise.

Hello PyneCone,

Can you check if after clicking ${OM_REFRESH_BTN} button in case when an alert should appear, there is no situation where you have multiple “alerts”, displayed one after the other?

I have similar error when trying to check multiple alerts text content

TimeoutError: page.waitForEvent: Timeout 5000ms exceeded while waiting for event “dialog”

=========================== logs ===========================
waiting for event “dialog”

mine issue mentioned here → Can not Handle two consecutives alerts - #3 by wojtekwp

btw. you can try to use “Handle Future Dialogs” keyword with action=accept if its only intent to “accept” alerts.