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.

Sahi with dynamic html pages

rohanrohan Members
edited May 2014 in Sahi - Open Source
Hi ,
I designed a dynamic html page which creates a window using javascript such that I can navigate to other windows through links from this window. Is there a way that these link-click be recorded by sahi, though this window is not exposed by sahi script.
Except this dynamically created window, Sahi script gets injected in all windows throughout the recording.

following is the html page:


<html>
<head>
<script>
function openWindow()
{
var parent = this.window;
var win = window.open("","","directories=no,height=100,left=10,location=no,menubar=no,navigationbar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,top=170,width=100","false");
win.document.body.innerHTML = document.getElementById('try_div').innerHTML;
win.focus();
}
</script>
</head>
<body>
<button type="button" onClick = "openWindow();">OpenDynamicWindow</button>
<div style = "visibility:hidden">
<div id = "try_div">
<a href = "http://sahi.co.in/"; target="_blank" onClick = "window.close();" >link1</a><br>
<a href = "http://sahi.co.in"; target="_self" onClick = "window.close();">link2_self</a><br>
<a href = "http://sahi.co.in/forums"; target="_blank" onClick = "window.close();" >link3</a><br>
</div>
</div>
</body>
</html>
Sign In or Register to comment.