I am pretty new to Watir & Ruby. So far I am able to figure out few things but
am badly stuck at this issue.
I have links on a page which are a part of javascript stored in .js files.
Currently watir doesn't recognize it (atleast the way I am doing it). The
workaround I have is to actually call the url which is supposed to be generated
via that link.
What is the correct way to click on the link that is stored in a js file.
Here is the HTML for that page:
[CODE]
<script>
document.onkeydown=function() { var keyCode = window.event.keyCode;
return handleHotKey('', keyCode);}
function handleHotKey(modifier, keyCode) { var url = ''; var success =
false;
switch (keyCode) { case 83: url = "search.do"; success = true; break; }
if (success) { var newForm = document.createElement("<form name='goForm'
method='post' action='" + url + "'><form>");
document.body.insertBefore(newForm); newForm.submit();}return success;
}</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>WPA::Wellness Plan Administration System</TITLE>
<link rel="stylesheet" href="style/master.css">
</HEAD>
<BODY bgColor=#efefe7>
<SCRIPT type=text/javascript>
function Go(){return}
[b]</SCRIPT>
<SCRIPT src="style/menu_config.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/menu_com.js" type=text/javascript></SCRIPT>[/b]
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td valign="middle" align="center"> <OBJECT
codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0
classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=256 height=206>
<PARAM NAME="movie" VALUE="flash/WPAlogo2.swf"><PARAM NAME="quality"
VALUE="high">
<embed src="flash/WPAlogo.swf" quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash" width="256" height="206">
</embed></OBJECT> </td> </tr></table>
</BODY></HTML>
[/CODE]
Sorry for the long code.
Appreciate your help
Prashant
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5259&messageID=14602#14602
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general