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.

How to handle seqential alerts in sahi.

Mang_0Mang_0 Members
edited May 2013 in Sahi - Open Source
How to handle two sequential javascript alerts in sahi. Like I will do an action, after that i will get two alerts sequentially( say alert1 and alert2). By using "lastAlert" java function i can extract only alert2 message. Can any1 please tell me how to extract alert1 message. I am not doing any actions between two alerts. Once the alert1 is suppressed, alert2 comes automatically.

Code: browser.lastAlert();

Answers

  • Hi Mang_0,
    Currently, you can extract only the last alert i.e. alert2 in this case, using Sahi.

    Regards.
















Sign In or Register to comment.