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.

q: new tab opens in new broser

IoanaIoana Members
edited September 2013 in Sahi Pro
Hello,

When I click on a link, it opens the tab in a new browser. how can I verify the url in that new browser?
I tried:

var $link = _getText(_link("fromurl"));
_click(_link("fromurl")); //it opens the tab in other browser
var $getBaseURL = _getBaseUrl();
_assertEqual($link, $getBaseURL); //but $getBaseURL is the url from where i started, not the url from the page that opened.

Can someone help?

Best Answer

  • edited September 2013 Answer ✓
    Hi loana,
    Please try adding:
    _selectWindow("<title_of_your_new_window>");
    
    after the following line:
    _click(_link("fromurl"));
    

    Please let me know if it works for you.

    Regards.

Answers

This discussion has been closed.