shreeks Posted June 2, 2011 Share Posted June 2, 2011 I need to click on Month Combo box and select the month as March. I have tried the following code using _IEFormGetCollection. #include <ie.au3> #include<Debug.au3> AutoItSetOption("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("WinTextMatchMode", 1) $oIE = _IECreate("http://ctsintcospsbo1:8080/AIC/HTML/AmIcognizant.html", 1, 1, 1, 1) _IELoadWait($oIE) $colForms = _IEFormGetCollection ($oIE ) MsgBox(0,"",$colForms) For $oForm In $colForms $oFormElements = _IEFormElementGetCollection ( $oForm ) For $oFormElement In $oFormElements If $oFormElement.id = 'MonthList' Then MouseClick("left") Next Next Attach the source code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- InstanceBegin template="/Templates/masterOnecognizant.dwt" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>One Cognizant</title> <!-- InstanceEndEditable --> <meta name="Keywords" content="One Cognizant" /> <meta name="Description" content="One Cognizant" /> <link href="../css/base.css" rel="stylesheet" type="text/css" /> <link href="../css/sharepointcore.css" rel="stylesheet" type="text/css" /> <link href="../css/banner.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../script/jquery.js"></script> <script type="text/javascript" src="../script/pageScript.js"></script> <!-- InstanceBeginEditable name="head" --> <link href="../css/MICognizant.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../script/AmICognizant.js"></script> <script type="text/javascript" src="../script/AICjquery.jcarousel.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel(); jQuery('#mycarousel2').jcarousel(); jQuery('#mycarousel3').jcarousel(); tabView(); hoverText(); appGraph(); closeappGraph(); tabbedPannel() var flagIndicator = '<span class="flagStat"> </span>'; $('.left_tabs .tab5').prepend(flagIndicator); $('#mycarousel .appBox:eq(2)').prepend(flagIndicator); }); //--> </script> <!-- InstanceEndEditable --> </head> <body> <div id="container"> <!--Header Part start--> <div id="header"> <div id="logo"><a href="../index.html"><img src="../images/logo_1c.png" alt="logo" /></a></div> <div id="header_rightbox"> <div class="top_nav"> <!--Top Navigation start--> <div id="topNavigation"> <ul class="mainmenu"> <!-- InstanceBeginEditable name="topNavLinks" --><!-- InstanceEndEditable --> <li> <div class="languageBox"><a href="#" class="flt_left" >English</a><a href="#" class="language languagearrow"> </a> </div> </li> <li><span class="seperator">|</span></li> <li class="freqTask hide" style="position:relative;"> <a href="#" class="topLevel">My Frequent Tasks</a> <div class="hover_toplink"> <a href="#" style="padding:5px;">My Frequent Tasks</a> <img src="../images/top_shadownav.png" alt="top" class="topShadow"/> <ul class="nav_submenu" style="padding-top:10px;"> <li><a href="#">Raise a s/w or h/w request</a></li> <li><a href="#">Fill/View Timesheet</a></li> <li><a href="#">Supervisor change request</a></li> <li class="add_taskdevider"> </li> <li class="add_task"><a href="#"> Add a Task</a></li> <li class="btm_gradient"></li> <li class="btm_shadow"></li> </ul> </div> </li> <li class="hide"><span class="seperator">|</span></li> <li class="settings"><a href="#">Settings</a> <div class="hover_toplink"> <a href="#">Settings</a> <img src="../images/top_shadownav_settings.png" alt="top" class="topShadow"/> <ul class="nav_submenu" style="padding-top:10px;"> <li><a href="#">App Inventory</a></li> <li><a href="#">Downtime Notifications</a></li> <li class="btm_gradient"></li> <li class="btm_shadow"></li> </ul> </div> </li> <li><span class="seperator">|</span></li> <li> <a href="#"> Help</a></li> <li><span class="seperator">|</span></li> <li> <a href="#"> Site action</a></li> <li><span class="seperator">|</span></li> <li> <a href="#"> Feedback</a></li> </ul> </div> <div class="oneStoreLink"> <a href="#"> One Store</a> </div> <div class="clear"></div> <!--Top Navigation end--> </div> <div class="clear"></div> <div class="welcome_userbox"> <div class="flt_left"> Welcome :</div> <div class="userName flt_left">Panda, Arun Kumar </div> <div class="flt_left"> | <a href="#">Logout </a></div> <div class="clear"></div> </div> </div> <div class="clear"></div> </div> <!--Header Part end--> <div id="banner"> <div class="banner_top"></div> <div class="banner_content"> <div class="banner_header"> <div class="btn_collapse"><a href="#" class="banner_btn">Open</a></div> <!-- <div class="bannerList"> <div class="banner_heading"> <div class="banner_title"><a class="txtDarkbrown" href="#"><img src="images/ico_bay.gif" alt="BAY" />Weekend drive on 17th July 2010</a> </div> <div class="user_count">(<span class="txtred"><span id="ctl00_sssss_idName">64 Views</span></span>)</div> </div> <div class="bannerText"><img src="images/ico_bay_big.gif" alt="bay" class="flt_left" /> <div class="tab_details flt_left"> Interview Locations <dl class="location_list flt_left"> <dd> <a href="#">Bangalore</a> </dd> <dd> <a href="#">Kolkata</a> </dd> <dd> <a href="#">Hyderabad</a> </dd> <dd> <a href="#">Coimbatore</a> </dd> <dd> <a href="#">Pune</a> </dd> </dl> <div class="flt_left"><img src="images/ico_bay_child.gif" alt="bay" width="50" height="64" /></div> <div class="clear"></div> </div> <div class="clear"></div> </div> </div> <div class="bannerList"></div> <div class="bannerList lastItem"> <div class="clear"></div>--> <ul> <li> <div class="banner_heading"><a href="#" class="txtDarkbrown"><img src="../images/ico_bay.gif" alt="BAY" />Weekend drive on 17th July 2010 </a> <div class="user_count">(<span class="txtred"><span>64 Views</span></span>)</div> </div> <div class="bannerText"><img src="../images/ico_bay_big.gif" alt="bay" class="flt_left" /> <div class="tab_details flt_left"> Interview Locations <dl class="location_list flt_left"> <dd> <a href="#">Bangalore</a> </dd> <dd> <a href="#">Kolkata</a> </dd> <dd> <a href="#">Hyderabad</a> </dd> <dd> <a href="#">Coimbatore</a> </dd> <dd> <a href="#">Pune</a> </dd> </dl> <div class="flt_left"><img src="../images/ico_bay_child.gif" alt="bay" width="50" height="64" /></div> <div class="clear"></div> </div> <div class="clear"></div> </div> </li> <li> <div class="banner_heading"><img src="../images/ico_watch.gif" alt="watch" width="27" height="18" /><a href="#" class="txtBrown">Watch Frank’s appearance on ...</a> <div class="user_count">(<span class="txtred"><span>64 Views</span></span>)</div> </div> <div class="bannerText"><img src="../images/banner_photo_franks.jpg" alt="franks" class="flt_left" /> <div class="tab_details">Preparing for the new normal. The global downturn had the unintended consequence... <a href="#" class="more_link">more</a> </div> <div class="clear"></div> </div> </li> <li class="lastItem"> <div class="banner_heading flt_left"><img src="../images/ico_greeninitiative.gif" alt="green" width="27" height="19" /><a href="#" class="txtGreen"><span class="flt_left">Green Initiative</span></a> <div class="user_count">(<span class="txtred"><span>64 Views</span></span>)</div> </div> <div class="bannerText clear"><img src="../images/ico_green_big.gif" alt="greeb" class="flt_left" /> <div class="tab_details">Get more info on Cognizant’s Green Initiatives and how you can participate. <a href="#" class="more_link">more</a> </div> <div class="clear"></div> </div> </li> </ul> <div class="clear"></div> </div> <div class="clear"></div> </div> </div> <div class="btm_banner"><img src="../images/banner_btm.png" alt="bottom banner" /></div> <!--Banner Part end--> <div id="wrapper"> <!--Script for active left Tab --> <!-- InstanceBeginEditable name="scriptRegation" --><script type="text/javascript">var pageVar = 'tab5';</script><!-- InstanceEndEditable --> <!--Search--> <div id="search_wrapper"> <div class="search" id="search_box"> <div class="search_field"> <!-- <input name="textfield" type="text" class="search_field" id="textfield" value="What would I like to do?" onfocus="this.value=''" /> --> <input name="textfield" type="text" class="search_field" id="textfield" onblur="if(this.value=='')this.value='What would I like to do?'" onfocus="if(this.value=='What would I like to do?')this.value=''" value="What would I like to do?" /> </div> <div class="searchbtn_field"> <input name="" type="button" class="btn_field" value="Search"/> </div> <div class="clear"></div> </div> </div> <!--Search property end--> <!--<div id="col_Leftpannel" class="comumn_box"> <div class="left_tabs"> <ul> <li><a href="#" class="tab1">One Click</a></li> <li><a href="../one-concierge.html" class="tab2">One Concierge</a> <div class="newupdate">2</div> </li> <li><a href="../one-Curator.html" class="tab3">One Curator</a></li> <li><a href="../am-i-cognizant.html" class="tab4">Am I Cognizant?</a></li> </ul> </div> </div>--> <!--Left Column--> <div id="col_Leftpannel" class="comumn_box"> <div class="left_tabs"> <ul> <li><a href="#" class="tab1">One Click</a></li> <li><a href="#" class="tab2">One Concierge</a> <div class="newupdate">2</div> </li> <li><a href="#" class="tab3">One Curator</a></li> <li><a href="#" class="tab4">One Concerto</a></li> <li><a href="#" class="tab5">Am I Cognizant?</a></li> </ul> </div> </div> <!--Left Column end --> <div id="content_wrapper"> <!--for left tab links and two column content use id="col_centerPannel and id="col_Rightpannel" and for left tab links and 1 column content use class="wide_wrapper" --> <!-- InstanceBeginEditable name="PageContent" --> <div id="MICognizant"> <div class="titleBox"> <h2>Dashboard</h2> <div class="yourVirtualcup"> <ul> <li><img src="../images/aicIcon_goldtrophy.png" alt="trophy" width="16" height="16" align="left" />305</li> <li class="seperator"> | </li> <li><img src="../images/aicIcon_silvertrophy.png" alt="trophy" width="16" height="16" align="left" />205</li> <li class="seperator"> | </li> <li><img src="../images/aicIcon_bronzetrophy.png" alt="trophy" width="16" height="16" align="left" />1245</li> <li class="seperator"> | </li> <li><img src="../images/aicIcon_coins.png" alt="trophy" width="16" height="16" align="left" />155</li> </ul> <span>Your Virtual Cupboard:</span><br class="clear" /> </div> <div class="clear"></div> </div> <ul id="filterBox"> <li>Sort: </li> <li class="seperator"> | </li> <li class="activefilter">Recently Used</li> <li class="seperator"> | </li> <li><a href="#">Recently Updated </a></li> <li class="seperator"> | </li> <li><a href="#">Highly Used</a></li> </ul> <br class="clear" /> <div id="iconsContainer"> <div class="slide_wrapper"> <div class=" jcarousel-skin-tango"> <div class="jcarousel-container jcarousel-container-horizontal mycarouselOne" id="mycarousel"> <div class="jcarousel-clip jcarousel-clip-horizontal slide1"> <ul class="jcarousel-list jcarousel-list-horizontal" > <!-- jcarousel 1 Tile Start here --> <li> <div class="slideBox"> <div class="appBox"> <div class="imgBox"><img src="../images/aic_appicon.gif" alt="App Icon" /></div> <div class="appName">Associate work-hours</div> </div> </div> </li> <!-- jcarousel 1 Tile End here --> </ul> </div> <div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;"></div> <div class="jcarousel-next jcarousel-next-horizontal" style="display: block;"></div> </div> </div> </div> <div class="slide_wrapper"> <div class=" jcarousel-skin-tango"> <div class="jcarousel-container jcarousel-container-horizontal mycarouselTwo" id="mycarousel2"> <div class="jcarousel-clip jcarousel-clip-horizontal slide1"> <ul class="jcarousel-list jcarousel-list-horizontal" > <!-- jcarousel 2 Tile Start here <li> <div class="slideBox"> <div class="appBox"> <div class="imgBox"><img src="../images/aic_appicon.gif" alt="App Icon" /></div> <div class="appName">App Name here</div> </div> </div> </li>--> <!-- jcarousel 2 Tile End here --> </ul> </div> <div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;"></div> <div class="jcarousel-next jcarousel-next-horizontal" style="display: block;"></div> </div> </div> </div> <div class="slide_wrapper"> <div class=" jcarousel-skin-tango"> <div class="jcarousel-container jcarousel-container-horizontal mycarouselThree" id="mycarousel3"> <div class="jcarousel-clip jcarousel-clip-horizontal slide1"> <ul class="jcarousel-list jcarousel-list-horizontal" > <!-- jcarousel 3 Tile End here <li> <div class="slideBox"> <div class="appBox"> <div class="imgBox"><img src="../images/aic_appicon.gif" alt="App Icon" /></div> <div class="appName">App Name here</div> </div> </div> </li>--> <!-- jcarousel 3 Tile End here --> </ul> </div> <div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;"></div> <div class="jcarousel-next jcarousel-next-horizontal" style="display: block;"></div> </div> </div> </div> </div> <!--overlay graph box code--> <div id="dbViewContainer" style="display:none;"> <div class="dbViewbox"> <div class="closedbViewbox"><a href="#">Close</a></div> <iframe id="graphContainer" scrolling="no" width="747" height="447" frameborder="0"></iframe> <!-- <div class="viewRow"> <div id="choolseView">Choose A View:</div> <div id="ResetView">Reset to <a href="#" class="bold">Default View</a></div> <br class="clear" /> </div> <div class="ui-tabs"> <ul class="ui-tabs-nav"> <li title="Month" class="ui-tabs-selected"><a href="#">Month</a></li> <li title="Fortnight"><a href="#">Fortnight</a></li> <li title="Week"><a href="#">Week</a></li> <li title="Days" class="lastTab"><a href="#">Days</a></li> </ul> <div id="Month" class="ui-tabs-panel"> <div class="ComboBox"> <select name="MonthList" class="formlist" id="MonthList"> <option>Select</option> <option value = "1">January</option> <option value = "2">February</option> <option value = "3">March</option> <option value = "4">April</option> <option value = "5">May</option> <option value = "6">June</option> <option value = "7">July</option> <option value = "8">August</option> <option value = "9">September</option> <option value = "10">October</option> <option value = "11">November</option> <option value = "12">December</option> </select> </div> <div class="GraphBox"> <img src="../images/graph_month.png" alt="Graph" /> </div> </div> <div id="Fortnight" class="ui-tabs-panel" style="display:none;"> <div class="ComboBox"> <select name="FortNight" class="formlist" id="FortNight"> <option>Select</option> <option value = "1">1-15 Apr 2011</option> <option value = "1">16-30 Apr 2011</option> </select> </div> <div class="GraphBox"> <img src="../images/graph_fortnight.png" alt="Graph" /> </div> </div> <div id="Week" class="ui-tabs-panel" style="display:none;"> <div class="ComboBox"> <select name="WeekMenu" class="formlist" id="WeekMenu"> <option>Select</option> <option value="week1">01-07 apr 2011</option> <option value="week2" >08-14 apr 2011</option> <option value="week3">15-21 apr 2011</option> <option value="week4">22-28 apr 2011</option> <option value="week4">29-30 apr 2011</option> </select> </div> <div class="GraphBox"> <img src="../images/graph_week.png" alt="Graph" /> </div> </div> <div id="Days" class="ui-tabs-panel" style="display:none;"> <div class="ComboBox"> <select name="Daymenu" class="formlist" id="Daymenu"> <option>Select</option> <option value="week1">01-07 apr 2011</option> <option value="week2" >08-14 apr 2011</option> <option value="week3">15-21 apr 2011</option> <option value="week4">22-28 apr 2011</option> <option value="week4">29-30 apr 2011</option> </select> </div> <div class="GraphBox"> <img src="../images/graph_days.png" alt="Graph" /> </div> </div> </div> </div> --> </div> <!--overlay graph box code end--> </div> <!-- InstanceEndEditable --> </div> <div class="clear"></div> </div> <!--Wrapper Part end--> <div id="footer"> <div id="footer_content"> <div class="copyrightTxt">© 2010 Cognizant. All rights reserved.</div> <div class="browser_notes">Best viewed in 1024 x 768 or higher resolution with Internet Explorer 7+ browser.</div> <div class="clear"></div> </div> </div> <!--Footer Part end--> </div> <!-- InstanceBeginEditable name="Popup_Content" --> <!-- InstanceEndEditable --> </body> <!-- InstanceEnd --> </html> Thanks Learning is Lifelong! Link to comment Share on other sites More sharing options...
DaleHohm Posted June 2, 2011 Share Posted June 2, 2011 (edited) Not tested, but... If String($oFormElement.id) = 'MonthList' Then _IEAction($oFormElement, "click") Dale Edit: had omitted "click" Edited June 2, 2011 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
shreeks Posted June 3, 2011 Author Share Posted June 3, 2011 Not tested, but... If String($oFormElement.id) = 'MonthList' Then _IEAction($oFormElement, "click") Dale Edit: had omitted "click" I have tried with the above mentioned command.But Its not clicking the month drop down list. I need to select the drop down list and select the month from the list Attached the snapshot for your reference. This is the code which I have tried. #include <IE.au3> ShellExecute ("iexplore.exe",'http://ctsintcospsbo1:8080/pentaho/content/pentaho-cdf/RenderXCDF?solution=steel-wheels&path=%2FWT_Sample&action=wtsample.xcdf&template=mantle') sleep(4000) $oIE = _IEAttach("Community Dashboard Framework") $colForms = _IEFormGetCollection ($oIE ) ;MsgBox(0,"",$colForms) For $oForm In $colForms $oFormElements = _IEFormElementGetCollection ( $oForm ) For $oFormElement In $oFormElements If String($oFormElement.id) = 'regionselect' Then _IEAction($oFormElement, "click") Next Next Source code for the web page is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><script type="text/javascript" src="/pentaho/content/pentaho-cdf/js/scripts.js?version=bedd9f9112f8cf54915d4fef90cb249e"></script><link href="/pentaho/content/pentaho-cdf/js/styles.css?version=afe784ea72a0855a90ba39e1b6485150" rel="stylesheet" type="text/css" /><link rel="stylesheet" type="text/css" href="/pentaho/content/pentaho-cdf/js/theme/cupertino/jquery-ui-1.8.custom.css"/> <!--[if lte IE 8]><link rel="stylesheet" href="/pentaho/content/pentaho-cdf/js/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Community Dashboard Framework</title> <meta name="keywords" content="" /> <meta name="description" content="" /> </head> <body> <!-- Clean content--> <script language="javascript" type="text/javascript"> Dashboards.context = { "params": {}, "roles": [ "Admin", "Authenticated", "ceo" ], "serverLocalDate": 1307098219524, "serverUTCDate": 1307118019524, "user": "joe" } </script> <script language="javascript" type="text/javascript"> Dashboards.storage = {} </script> <div id="dashboardContent"><html> <BODY> <table> <tr> <th>Month</th> <th>Week</th> <th>Days of Week</th> </tr> <tr> <td><div id="regionselect" style=" width:50px; height:20px"> </div></td> <td><div id="weekSelect" style=" width:50px; height:20px"> </div></td> <td><div id="daySelect" style=" width:50px; height:20px"> </div></td> </tr> </table> <div id="orderStatusPrptObject" style="top:50px ; width:850px; height:400px"></div> <script language="javascript" type="text/javascript"> var result = " "; var Month = " "; var Week = " "; var DAY = " "; var newResult1 = " "; var newResult2 = " "; monthList={ name: "monthList", type: "select", solution: "steel-wheels", parameter: ["result"], path: "WT_Sample", action: "Region_Select.xaction", htmlObject: "regionselect", executeAtStart: true, postChange: function(){ var obj1 = document.getElementById('regionselect').getElementsByTagName('select'); var obj2 = obj1[0].getElementsByTagName('option'); for(var i=0;i<obj2.length;i++){ if(obj2.selected){ Month = obj2.value; break; } } Dashboards.fireChange('Month',Month); } } weekList = { name: "weekList", type: "select", solution: "steel-wheels", parameter: ["newResult1"], listeners: ["Month"], parameters:[["Month", "Month"]], path: "WT_Sample", action: "Week_select.xaction", htmlObject: "weekSelect", executeAtStart: true, postChange: function(){ var obj1 = document.getElementById('weekSelect').getElementsByTagName('select'); var obj2 = obj1[0].getElementsByTagName('option'); for(var i=0;i<obj2.length;i++){ if(obj2.selected){ Week = obj2.value; break; } } Dashboards.fireChange('Week',Week); } } dayList = { name: "dayList", type: "select", solution: "steel-wheels", parameter: ["newResult2"], listeners: ["Month", "Week"], parameters:[["Month", "Month"], ["Week", "Week"]], path: "WT_Sample", action: "Day_select.xaction", htmlObject: "daySelect", executeAtStart: true, postChange: function(){ var obj1 = document.getElementById('daySelect').getElementsByTagName('select'); var obj2 = obj1[0].getElementsByTagName('option'); for(var i=0;i<obj2.length;i++){ if(obj2.selected){ DAY = obj2.value; break; } } Dashboards.fireChange('DAY',DAY); } } orderStatusReport = { name: "orderStatus", type: "prpt", solution: "AIC_WTD", path: "WTD-Updated", action: "WTD_V3.prpt", listeners:["Month", "Week" , "DAY"], parameters: [["Month", "Month"], ["Week", "Week"], ["DAY" , "DAY"]], htmlObject: "orderStatusPrptObject", executeAtStart: true } var components = [monthList, weekList, dayList, orderStatusReport]; function load() { Dashboards.init(components); } load(); </script> </BODY> </html> </div> </body> </html> Thanks Learning is Lifelong! Link to comment Share on other sites More sharing options...
DaleHohm Posted June 4, 2011 Share Posted June 4, 2011 Please read about _IEFormElementOptionselect Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
shreeks Posted June 6, 2011 Author Share Posted June 6, 2011 Please read about _IEFormElementOptionselectDaleHi I have tried with _IEFormElementOptionselect below is my code.#include <IE.au3>ShellExecute ("iexplore.exe",'http://ctsintcospsbo1:8080/pentaho/content/pentaho-cdf/RenderXCDF?solution=steel-wheels&path=%2FWT_Sample&action=wtsample.xcdf&template=mantle')sleep(4000)$oIE = _IEAttach("Community Dashboard Framework")Sleep(4000)$colForms = _IEFormGetCollection ($oIE )MsgBox(0,"",$oIE)For $oForm In $colForms $oFormElements = _IEFormElementGetCollection ( $oForm ) For $oFormElement In $oFormElements If $oFormElement.id = 'monthList' Then _IEFormElementOptionselect ( $oFormElement, "April", 1, "byText") ExitLoop 2 NextNextBut Nothing happens.Kindly help on this. Learning is Lifelong! Link to comment Share on other sites More sharing options...
DaleHohm Posted June 6, 2011 Share Posted June 6, 2011 (edited) Well first I would simplify your code to just 3 lines like this: #include <IE.au3> $oIE = _IECreate('http://ctsintcospsbo1:8080/pentaho/content/pentaho-cdf/RenderXCDF?solution=steel-wheels&path=%2FWT_Sample&action=wtsample.xcdf&template=mantle') $oSelect = _IEGetObjById($oIE, 'monthList') _IEFormElementOptionSelect ( $oSelect, "April", 1, "byText") See if this makes it easier to debug. Dale Edited June 6, 2011 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now