I am just a few days hold in he WATIR world and having a issue clicking on a item in a tree menu. The code looks like this...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Transitional//EN"><META http- equiv="Content-Type" content="text/html; charset=utf-8"> <HTML><BODY class="TreeBody"><FORM id="NavForm" name="NavForm" action="TM1WebNavigationTree.aspx" method="post"><DIV class="TreeNavPanel" id="nav_tree" style="BORDER-RIGHT: 0px; BORDER- TOP: 0px; Z-INDEX: 202; LEFT: 0px; OVERFLOW: auto; BORDER-LEFT: 0px; WIDTH: 100%; BORDER-BOTTOM: 0px; POSITION: absolute; TOP: 27px; HEIGHT: 286px"><DIV id="tn_0vis" style="WHITE-SPACE: nowrap"><DIV id="tn_20vis" style="WHITE-SPACE: nowrap"><DIV id="tn_21vis" style="WHITE-SPACE: nowrap"><DIV id="tn_24" onmouseover="appnodeMouseover(event);" style="WHITE-SPACE: nowrap" onmouseout="appnodeMouseout(event);" ObjectSource="TM1://ctc_planning/ blob/PUBLIC/.\}Externals\Insert Project.xlsm_20111103174516.xlsm" ObjectDescription="Insert Project.xlsm" ObjectName="Insert Project.xlsm" ObjectIsPrivate="false" ObjectType="ExternalFile"><SPAN class="TreeNode"> Insert Project.xlsm </SPAN></DIV></DIV></DIV></DIV></ DIV></FORM></BODY></HTML> I am trying to click on "Insert Project.xlsm" and cannot get to it. Here is the statement I am using: browser.frame(:id, "navFrame").form(:id, "NavForm").div(:class, "TreeNavPanel").div(:id, "tn_24").span(:class, "TreeNode").span(:text=>"Insert Project.xlsm").click I am sure there is probably a easier/better way but have spent a lot of time looking without any help. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
