vkrisz81 Posted January 4, 2014 Share Posted January 4, 2014 Hello! there is a problem while i tried to make myself an automated login and gas data filling! But, if you can see the page there is a frame.. ok i found with program but i can not do more! look that page:"https://www.fogaz.hu/Ugyfelszolgalat" if you see there is a login fiueld, i would like reach inner sap-alias id input field in center of page! i opened page, detected woindow object, i refer to this object, i found iframe! i refer to it, but i can not find that id .. why? how? can anybody help me in this? Link to comment Share on other sites More sharing options...
jdelaney Posted January 4, 2014 Share Posted January 4, 2014 Similar questions are answered many times. You can do a simple forum search, or: IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 4, 2014 Author Share Posted January 4, 2014 ok ok! there is a sample.. but have you tried already? because there is a special error! you can not refer to that frame and the form in that frame.. i dont know why, but this webpage is an interesting .. i did it on other web but on this you can not! so this is not working !!!! i am sry .. theres is no name tag to iframe so i changed that sample to _iegetobjbyid but there are also errors! error and error.. so can you help me than? Link to comment Share on other sites More sharing options...
jdelaney Posted January 4, 2014 Share Posted January 4, 2014 (edited) I'd not traverse to an out of country site, but if you post the HTML of the frame, form, and input, someone will help. Post the code you used. Did you take the snippet and not modify it? that example was assuming that you already have $oIE declared, ie.au3 included, and some other stuff. Also, post the error. we can't read your mind/outputs. Edited January 4, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Kidney Posted January 4, 2014 Share Posted January 4, 2014 post the page source and so we can help you. Link to comment Share on other sites More sharing options...
JohnOne Posted January 4, 2014 Share Posted January 4, 2014 Cross domain frames can not be actioned on. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ownedya Posted January 5, 2014 Share Posted January 5, 2014 This seemed to work for me, of course you have to change the username and password: #include <IE.au3> Local $oIE = _IECreate("https://fgmwebdiszp.fogaz.hu/sap/bc/webdynpro/sap/zusz2_wd_bejelentkezes?PortalId=tzap3mfypj1hjufburraklze&ProfilId=&sap-language=HU&sap-syscmd=nocookie") Local $oForm = _IEFormGetObjByName($oIE, "loginForm") Local $oUser = _IEFormElementGetObjByName($oForm, "sap-alias") _IEFormElementSetValue($oUser, "username") Local $oPass = _IEFormElementGetObjByName($oForm, "sap-password") _IEFormElementSetValue($oPass, "password") _IENavigate($oIE, "javascript:callSubmitLogin('onLogin');") Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 5, 2014 Author Share Posted January 5, 2014 i tried it already, but then ouccured an error, real, i did not use the javascript method to senmd data, i used the simple send button. i found this url(we need find it due to ssid chars), but this was an error wjhile send.... now i try this version! ... so it doesnt work, http 500! i tried this way already :S any other way to reach this frame?? This seemed to work for me, of course you have to change the username and password: #include <IE.au3> Local $oIE = _IECreate("https://fgmwebdiszp.fogaz.hu/sap/bc/webdynpro/sap/zusz2_wd_bejelentkezes?PortalId=tzap3mfypj1hjufburraklze&ProfilId=&sap-language=HU&sap-syscmd=nocookie") Local $oForm = _IEFormGetObjByName($oIE, "loginForm") Local $oUser = _IEFormElementGetObjByName($oForm, "sap-alias") _IEFormElementSetValue($oUser, "username") Local $oPass = _IEFormElementGetObjByName($oForm, "sap-password") _IEFormElementSetValue($oPass, "password") _IENavigate($oIE, "javascript:callSubmitLogin('onLogin');") Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 5, 2014 Author Share Posted January 5, 2014 (edited) i feel you wqill have right :S i will not be able to manage that login form! only with tabs! i tried to send 17 tab to ie window so it can focus to login name field, but if they pout another linke to the page will occur error.. any more professional idea to it? modify: i can do only if i do a focus event to this frame and send tab 2, it will focus to login field element, i can send a value to it, send again tab, send pass value, and again tab and this will focusing to send button! at this moment this is the only way what i can do to manage this frame, but this is terrible!!! not elegant!!! problem may be if thee focus of this window loose, the tab event will send to other window! but if i use object , the value sending will send to the input field not to the unreachable something.. this way contain much error possibility! the reason why i not copy whole site, that is soo big and if you would like to help me you have to use that site! there is no problem to use that, a simpley gas monthly value data sender page. like bills! but i want to automate the logining and clicking, and data filling, instead of 10 action it will be only 2 action, put value and press send button. but i wanted to do it elegant! Cross domain frames can not be actioned on. Edited January 5, 2014 by vkrisz81 Link to comment Share on other sites More sharing options...
mikell Posted January 5, 2014 Share Posted January 5, 2014 (edited) In ownedya's code remove the last line and try this for the button Seems to work as I get a login error $oButton = $oIE.document.GetElementById("b1") $oButton.fireEvent("onclick") Edit for typos Edited January 5, 2014 by mikell Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 5, 2014 Author Share Posted January 5, 2014 not works.. because b1 can not be found as i can see.. or if you send this form, internal server error again! you can not login to this form in alone window.. In ownedya's code remove the last line and try this for the button Seems to work as I get a login error $oButton = $oIE.document.GetElementById("b1") $oButton.fireEvent("onclick") Edit for typos Link to comment Share on other sites More sharing options...
ownedya Posted January 5, 2014 Share Posted January 5, 2014 not works.. because b1 can not be found as i can see.. or if you send this form, internal server error again! you can not login to this form in alone window.. What does not work? When I try it (and I mean my code and mikell's version), I get an error, that my username or pass is incorrect - because we don't have them. But it finds all input fields and the login button. Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 6, 2014 Author Share Posted January 6, 2014 (edited) and if i pass the correct values, it goes to http500..and since it i can not login to this page from this machine, sometimes maybe i can reach the frame but most of time i cant see the frame! it can not bee loaded since i tried these.. only http500. this is working in ff, but autoit can not handle ff.. just this ie and ie is a big shit :SWhat does not work? When I try it (and I mean my code and mikell's version), I get an error, that my username or pass is incorrect - because we don't have them. But it finds all input fields and the login button.ok pls copy here your code which is working in your opininon without http 500 because what i tried many way was fail.. pls copy to me your complete source i try that but i think here is other problem.. also!! not only reach the element!.. this is a stupid idiot cross site webpage!and if i pass the correct values, it goes to http500..and since it i can not login to this page from this machine, sometimes maybe i can reach the frame but most of time i cant see the frame! it can not bee loaded since i tried these.. only http500. this is working in ff, but autoit can not handle ff.. just this ie and ie is a big shit :Smaybe i can see the http500 because my pass-login is good. if i put incorrect value maybe i can reach your invalid data page, but if the data is correct the page will be stupid.. Edited January 6, 2014 by Melba23 Multiple successive posts merged Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 6, 2014 Moderators Share Posted January 6, 2014 vkrisz81,There is an edit button at bottom left of each post - USE IT! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
vkrisz81 Posted January 6, 2014 Author Share Posted January 6, 2014 ok ok but you dont have to bait me i just use this since 2 or 3 days? i try ^^ 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