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.

Select Browser Window

muhilan.rmuhilan.r Members
edited November -1 in Sahi - Open Source
Hi ,

I am clicking a link from a page which opens another browser window , is it possible to automate the webelements displayed in the newly opened browser window?

Comments

  • SumitraSumitra Members
    Hi muhilan.r,

    Yes,it is possible to automate.

    Sahi will identify the elements from the new browser with the prefix _popup("window name").
    Just Ctrl + hover on any element in the new window to access these elements.

    Regards
    Sumitra
  • Hi Sumitra,

    How to select the same from the Java code ? which java api will do the same operation ?

    Thanks in Advance.

    - Jayesh
  • kshitijitukshitijitu Moderators
    The following code will work.
    browser.popup("window name");

  • Thanks Kshitijitu for your response.
    Can I use the same code for any window which is coming up ?
    What could be the equivalent java code for,
    _selectWindow("Window_Name");

    Thanks,
    -Jayesh
  • Hi Jayesh,
    the equivalent java code would be
    browser.execute("_sahi._selectWindow('Window_Name');");
    
Sign In or Register to comment.