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.

Confirm delete pop-up is not opened

tejas269tejas269 Members
edited November -1 in Sahi - Open Source
Hi,

I have a program where, if we click on delete image a confirm delete pop-up is shown. I want to write a script where i want to make sure that the confirm delete box is shown and the item is not deleted from select box until we click 'ok' on the popup box.
But when i run the script through sahi, the popup box is not seen but the item is deleted from the select box.

my script is
_click(_image("Delete"));
_expectConfirm("Are you sure you want to delete the record?", false);

Comments

  • Hi

    could you please provide the URL you are testing? I expect some javascript event to not recognize the click and let the popup appear. But I would look at the scripts first... does the popup appear when you cklick manually?

    Regards
    Wormi
  • Yes, the popup appears when I click in manually and also when I record it from controller.
    I used the recorded script to make a function.
  • narayannarayan Administrators
    Hi Tejas,

    The _expectConfirm should come before the click

    _expectConfirm("Are you sure you want to delete the record?", false);
    _click(_image("Delete"));

    It may be recorded in the wrong sequence by Sahi in some cases.

    Regards,
    Narayan
  • tejas269tejas269 Members
    Thank you Narayan, it works properly with the steps you have given.
    Sorry could not reply earlier as i was busy in manual testing.
Sign In or Register to comment.