18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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 execute sahi script on a new browser after opening a new browser through Sahi script
Hi,
I am able to open firefox browser from a browser using sahi script like:
var $path = "C:\\Program Files\\Mozilla Firefox\\firefox.exe";
//var $name = "firefox";
var $browseroption = " -profile
\\sahi_pro_V4.0\\userdata\\browser\\ff\\profiles\\sahi1 -no-remote";
_execute($path + $browseroption);
But, when i give _navigateTo after this, it is executed in the first browser itself. Is it possible to run it in the newly opened firefox browser?
I am able to open firefox browser from a browser using sahi script like:
var $path = "C:\\Program Files\\Mozilla Firefox\\firefox.exe";
//var $name = "firefox";
var $browseroption = " -profile
_execute($path + $browseroption);
But, when i give _navigateTo after this, it is executed in the first browser itself. Is it possible to run it in the newly opened firefox browser?
Answers
Please refer to the following documentation:
http://sahi.co.in/docs/v5.1.0.0/sahi-apis/popup-windows.html
Regards,
Pratyush
I' am getting an error as 'Window/Domain not found: popupNameFromStep=Firefox; derivedName=; windowName=; windowTile=Sahi Start; wasOpened=0; domain= '.
I' am opening firefox 26.0 from chrome. What should i mention as windowIdentifier in _selectWindow([$windowIdentifier]) part. I gave like, _selectWindow("Firefox"). But, the above error is shown in sahi log and i' am using sahi open source.
Like its mentioned in the API documentation page,
the windowIdentifier shouldn't be "Firefox" but it should be any of the the window name, the window title, or the window URL or a regular expression of any of these. To reference the base window, omit this parameter or use null.
Regards,
Pratyush
Sorry i' am a beginner to sahi. I have my firefox homepage set as http://sahi.co.in (the window name is 'Sahi Web Test Automation Tool'). So, i gave as
var $path = "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe";
var $name = "firefox";
var $browseroption = " -profile C:\\userDir\\browser\\ff\\profiles\\sahi$threadNo -no-remote";
_execute($path + $browseroption);
_selectWindow("Sahi Web Test Automation Tool");
_click(_link("HOME"));
But, the 'Home' link in the firefox browser is not invoked.
Sahi log shows :
Logging exception:
_popup("Sahi Web Test Automation Tool")._click(_link("HOME"));
Window/Domain not found: popupNameFromStep=Sahi Web Test Automation Tool; derivedName=; windowName=; windowTitle=Sahi Start; wasOpened=0; domain=