18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Handling asynchronous confirm popup

javaGurujavaGuru Members
edited November -1 in Sahi - Open Source
Hi,
We are using sahi to test a web application built using gwt. We are stuck with one issue.
Our application generates these confirm messages asynchronously.
Sahi by default does an "OK" to these messages. We are not able to simulate a "cancel" for these popups.
I tried using the _expectConfirm() api but was not successful. I think because the confirm message we want to cancel is not a result of a browser action.

Can you please help us out with this problem.

Thanks

Comments

  • narayannarayan Administrators
    Hi,

    Can you email us a screen shot of a page with that confirm dialog, and the Sahi script that is used? Please email it to support@sahi.co.in

    Thanks,
    Narayan
  • narayannarayan Administrators
    Re-reading your post, it looks like it may just be that the _expectConfirm() is not at the right place. You could try adding the _expectConfirm much earlier in the script.
  • Narayan,
    Thanks for the reply. I will try your suggestion.

    Thanks,
    Guru
  • javaGurujavaGuru Members
    Hi Narayan,
    I tried using _expectConfirm as you suggested but could not cancel the confirm popup.
    Since my server triggers these popups randomly (not in response to an event from the client) I am not able to handle it in my sahi script.
    Please help.

    Thanks,
    Guru
Sign In or Register to comment.