html - Controlling Menus within Internet Explorer with AutoIT -


i have been struggling on past 48 hours create script can basic things within internet explorer:

  1. log website
  2. select option dropdown menu
  3. select checkbox
  4. click "ok" button

i have no problem logging website, cannot seem menus working once logged in. have feeling them being dynamically created html experience limited not know sure. have tried range of different functions(_ieformelementgetobjbyname,_ieformgetcollection,_ieformgetobjbyname) among others cannot seem make work. cannot post full script contains passwords cannot post publicly, here user/password removed:

;created syd-jamest code found at: ;http://solubletech.blogspot.com.au/2011/02/use-autoit-v3-to-make-auto-login-script.html  #region ;*** variables const $dispatchsite = "https://equipmentrepaircas.interasset.com/cas/login?service=https%3a%2f%2fwww.iasdispatchmanager.com%2fdispatchmanager%2fj_acegi_cas_security_check"  const $uname="user" const $pwd="pass%" #endregion  #include <ie.au3>  ;*** navigate dispatch manager , login username & password $oie = _iecreate ($dispatchsite) $oform = _ieformgetobjbyname ($oie, "fm1") $oquery1 = _ieformelementgetobjbyname ($oform, "username") $oquery2 = _ieformelementgetobjbyname ($oform, "password")  _ieformelementsetvalue ($oquery1,$uname) _ieformelementsetvalue ($oquery2,$pwd) $obutton=_iegetobjbyname($oie,"submit") _ieaction ($obutton, "click") _ieloadwait($oie,0)  ;** section cannot work $oform1 = _ieformgetobjbyname ($oie, "isc_historyform") $test = _iegetobjbyid($oform1, "isc_1f") $omenu = _iegetobjbyid ($oform1,"isc_menubarbutton_0") ;isc_menubarbutton_0 ;$omenu = _iegetobjbyid ($oform1,"isc_1e") _ieaction ($test, "focus") 

this html of area trying access - doesn't show name, nor of dropdown options show on screen when selected.

<div id="isc_1e" eventproxy="isc_menubarbutton_0" style="position: absolute; left: 195px; top: 0px; width: 150px; height: 24px; z-index: 200810; overflow: hidden; cursor: pointer; -webkit-margin-before-collapse: collapse; -webkit-margin-after-collapse: collapse;" onscroll="return isc_menubarbutton_0.$lh()" onfocus="isc.eh.focusincanvas(isc_menubarbutton_0,true);" onblur="if(window.isc)isc.eh.blurfocuscanvas(isc_menubarbutton_0,true);" tabindex="-1" role="button" aria-haspopup="true"><table cellspacing="0" cellpadding="0" width="150" height="24" style="table-layout:fixed"><tbody><tr><td class="menubutton" style="padding-top:0px;padding-bottom:0px;text-align:center;vertical-align:middle"><div style="display:inline-block;max-width:100%;white-space:nowrap;vertical-align:middle"><div id="isc_1d" style="overflow:hidden;text-overflow:ellipsis;text-align:left"><img src="https://training.iasdispatchmanager.com/dispatchmanager/ias/images/icons/admin.png" align="texttop" border="0" suppress="true"> <b>admin</b></div></div></td></tr></tbody></table></div> 

the second part cannot work. if form object

$oform1 = _ieformgetobjbyname ($oie, "isc_historyform")

you have go on elements of object, done in first (password) part of script. next statement like:

$otest = _ieformelementgetobjbyname($oform1, "isc_1f").

load down autoit file "user defined function" , on examples "ie-management". here definition , examples work dropdown / select boxes. https://www.autoitscript.com/autoit3/docs/libfunctions/_ieformelementoptionselect.htm

you may try that. best regards, reinhard


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -