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 access a button on a window

isreenivasisreenivas Members
edited November -1 in Sahi - Open Source
Hi
I have a print link in my application. If i click that link manually,the data which is going to print will be opened in a separate tab and one "Print" window also opens with OK,Cancael buttons.
If we click on OK buttobn on that window,print will go to the printer.

I tried to automate this. clicking on print link was recorded but not OK button on the print window

how can i access that

can you suggest me the solution

Thanks
isreenivas

Comments

  • Hi isreenivas,

    Can you share the URL?

    Also, check if the "print" window with OK and cancel buttons is an pop up or not.

    Regards
    Sumitra
  • Hi sumithra

    Thanks for ur response. sorry I cannt share u the URL in the forums.
    Print is a popup with OK and Cancel buttons but not a window.


    Thanks
    sreenivas
  • Hi isreenivas,

    To automate OK button on the print window use:

    _expectConfirm(message,boolean);

    For more details:

    http://sahi.co.in/w/_expectConfirm

    Regards
    Sumitra
  • sorry sumithra

    I tried this but didnt work.

    can u suggest any solution.
  • Hi isreenivas,

    Can you please send the URL and the screenshot to sumitra.m.n@sahi.co.in

    Regards
    Sumitra
Sign In or Register to comment.