Sign in to follow this  
Followers 0
vkrisz81

How can i reach login field in frame?

15 posts in this topic

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?

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

post the page source and so we can help you.

Share this post


Link to post
Share on other sites

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');")

Share this post


Link to post
Share on other sites

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');")

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by vkrisz81

Share this post


Link to post
Share on other sites

#10 ·  Posted (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 by mikell

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

#13 ·  Posted (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 :S

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.

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 :S

maybe 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 by Melba23
Multiple successive posts merged

Share this post


Link to post
Share on other sites

vkrisz81,

There is an edit button at bottom left of each post - USE IT! :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

ok ok but you dont have to bait me :D

i just use this since 2 or 3 days? i try ^^

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0