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.

javascript popup name

ShebadaShebada Members
edited March 2012 in Sahi - Open Source
how to get javascritp popup name?
alwayz popup name change (not constant)

I need push button "Search" on active java popup

SAhi show me that element as "Search[1]" or "Search[5]" or "Search[98754]"

can i use?:
browser.popup(????popupname????)._click(_button("Search"));

I need help.

Comments

  • Hi Shebada,

    Try with browser.popup("/.*/")._click(_button("Search"));

    This is used to click search button in popup with any id.

    This might help you.

    Regards,
    Theeran.
  • Hi Theeran

    I have the same problem, in my case the popup's name changes always. For example:

    _Preview913cdb6c_7173_4198_ac76_9b3147ecfcee
    _Previewc3dc66b7_dfff_4243_8257_3f0f1cdcb876

    I tried to close the popup, but when I use the script:

    _popup("/.*/")._closeWindow();

    the main screen is closed.

    Could you help me please?

    Thank in advance,

    Christian
  • Hi Chjurupe,
    Try replacing _popup("/.*/")._closeWindow(); with
    _popup("/Preview/")._closeWindow();
    

    I think it should work for you then.

    Regards.
Sign In or Register to comment.