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 record the security alerts that gets poped up??

somisomi Members
edited November -1 in Sahi - Open Source
hi,

how to record the security alerts that gets poped up while opening the secured site or any site??????? (for ex: while opening "yahoomail" it makes a popup like "about to leave the secured page do u want to continue if so click 'yes/No' ")

Can someone help me in this issue???

Comments

  • Hi,

    Check if this works...

    _expectConfirm("Put the text that appears on the message box", true);

    Put this statement just before the event that triggers the message box.

    setting the second parameter to "true" clicks "OK" and false will click "NO".

    Regards,
    Pankaj.
  • I just used the way u told to.

    but its not working for the security alerts.

    Is there any alternative for this problem????
  • I could be that those are javascript pop-ups and not browser level confirmation alerts.

    Can you get any handles on the confirmation dialog via the DOM?
  • Hi am struck with java script popups, how would i handle java script popups?
  • Can you get any handles on the confirmation dialog via the DOM?
  • I am sorry, but i dont understand what do you mean. i am not aware of DOM
  • Web pages are based on a hierarchy of objects. That hierarchy is called the Document Object Model.

    If something is displayed on a page, you can use the DOM to address and change that object.

    Here's a tutorial:

    http://www.w3schools.com/htmldom/default.asp
  • narayannarayan Administrators
    Somi, the alert you talk about is not javascript generated. Based on the browser you are using, you will have to turn off these security alerts. If you are using firefox, type "about:config" in the navigation bar. Search for "secure". This will show these settings (and a few others)

    security.warn_entering_secure
    security.warn_leaving_secure
    security.warn_submit_insecure

    Double click on these and make sure the value is false for these. Close and reopen browser and these popups should go away.

    For Internet Explorer,
    Go to Tools -> Internet Options -> Advanced -> Security sub heading:
    Uncheck "Warn if switching between secure and not secure mode."
    Restart browser.
Sign In or Register to comment.