zabman Posted April 20, 2016 Share Posted April 20, 2016 Hi, I am trying to make a script that will do the following: log into a website select an option from a dropdown menu select a checkbox click an "OK" button so far I have been able to log into the site without issue, but accessing the in page menus is proving very problematic. Has anybody had any experience in this area? I think the in page menus are created dynamically so I wonder if that is where the problem is arising as I cannot find a name or ID in the html. I would love some help if anyone is able! Link to comment Share on other sites More sharing options...
AutoBert Posted April 20, 2016 Share Posted April 20, 2016 Naming the url would help by testing for help, Link to comment Share on other sites More sharing options...
zabman Posted April 20, 2016 Author Share Posted April 20, 2016 Hi AutoBert, I understand what you are saying, but the issue I am seeing is after a log in page and I don't feel comfortable posting those logins publicly. Link to comment Share on other sites More sharing options...
AutoBert Posted April 20, 2016 Share Posted April 20, 2016 your account data can be blank, i am not interested to get it, i am only interested url Link to comment Share on other sites More sharing options...
zabman Posted April 20, 2016 Author Share Posted April 20, 2016 sure thing, the url is https://equipmentrepaircas.interasset.com/cas/login?service=https%3A%2F%2Fwww.iasdispatchmanager.com%2Fdispatchmanager%2Fj_acegi_cas_security_check Link to comment Share on other sites More sharing options...
MichaelHB Posted April 20, 2016 Share Posted April 20, 2016 @zabman If the problem occurs after the login, we need to see the code that you are using and part of the HTML of the website. In portuguese (might be easy to the OP understand). Spoiler Você precisa colocar a parte do HTML do site que vc quer automatizar e mostrar o código que vc está usando pra podermos verificar o que está acontecendo. Link to comment Share on other sites More sharing options...
zabman Posted April 21, 2016 Author Share Posted April 21, 2016 Hi Michael, I understand what you are saying, but I am hesitant to post the password publicly. If there was someone willing to help I could PM some details to them? The code I have so far is as follows: ;Created by Zab from 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 to Dispatch Manager and login with 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) ; This is the area I cannot get to behave properly $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") The html is interesting - because it is dynamic I cannot see any of the dropdown menus that show up when I click through manually. <div id="isc_1G" eventproxy="isc_MenuBarButton_1" style="position: absolute; left: 345px; top: 0px; width: 150px; height: 24px; z-index: 200828; overflow: hidden; cursor: pointer; -webkit-margin-before-collapse: collapse; -webkit-margin-after-collapse: collapse;" onscroll="return isc_MenuBarButton_1.$lh()" onfocus="isc.EH.focusInCanvas(isc_MenuBarButton_1,true);" onblur="if(window.isc)isc.EH.blurFocusCanvas(isc_MenuBarButton_1,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_1F" style="overflow:hidden;text-overflow:ellipsis;text-align:left"><img src="https://training.iasdispatchmanager.com/dispatchmanager/ias/images/icons/workorder_new.png" align="TEXTTOP" border="0" suppress="TRUE"> <b>Work Orders</b></div></div></td></tr></tbody></table></div> Link to comment Share on other sites More sharing options...
MichaelHB Posted April 21, 2016 Share Posted April 21, 2016 Never post the username/passwd in public. That was not what i asked. I asked for the html code that you are trying to manipulate. Copy the html, check if there is sensitive information and edit it. Then post the code (or part of it) in tags, like you did to the autoit code, choose the html format. 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