Search the Community
Showing results for tags 'Internet Explorer 9'.
Found 1 result
Hi Folks. Looking for a little assistance to help login to one of my company's application's web pages. These are Intranet based pages, and not open to the general public, and I will try to provide the code and screen shots where I can. I have been attempting to get this login script to work for quite some time. Any help would be appreciated. I have 3 types of issues here. 1. using the basic _IEFormElementSetValue, instead of replacing the grayed out verbiage (user name) with an un-grayed out text (actual user name in black type font), it does enter the user name, but it is entered still as grayed out text in the input box. 2. to get the above to work, i've replaced using _IEFormElementSetValue and instead use an "_IEAction" (2 actually - focus / select all) then a "send" to manually put in the username. This works upon initial launch of the page, but when logged out, and logging back in, the IEactiion and send fail to enter the fields. 3. My company has an .hta application that launches a reporting app, but the page is designed exactly the same as the web page, (except the app contains the code - the .hta app), but it is still the exact same fields defined. Theoretically knowing the input boxes names as I do and that they're the same, I should be able to log into this app the same way. However, I can not. I once contacted dale through email to question why the .hta app would not respond, and he gave me some ideas, and stated if I still have issues, to post a topic here. so this is what I'm doing, because I still have issues with the .hta app. And I've also tried to attach to the .hta application as an embedded application, but still could not get the fields to populate (log in screen). I have attached screen shots of the intial view of the sign on page, and the view of an attempted signon using _IEFormElementSetValue. Here is my code to attempt to attach / launch-create the web page. Func _LaunchAdminApp () If $CurServNam= "" Then Return If WinExists("PCDS :: Management") Then Return Local $FTMAddress= "https://"&$CurServNam&"/admin" If NOT WinExists("Fluency for Imaging Log On") Then Local $oIE = _IECreate($FTMAddress) Else Local $oIEWhnd = WinGetHandle("Fluency for Imaging Log On") Local $oIE = _IEAttach($oIEWhnd) EndIf Local $Count = 0 If $AdmAutoLogin = 1 Then If $LoginIDAA = "" Then Return Do $Count+=1 Sleep(100) If $Count > 30 Then MsgBox(0,"Sorry","Can't sign in to Admin App!") Return EndIf Until IsObj($oIE) Local $oForm = _IEFormGetCollection($oIE,0) $Count = 0 Do $Count+=1 Sleep(100) If $Count > 30 Then MsgBox(0,"Sorry","Can't sign in to Admin App!")5 Return EndIf Until IsObj($oForm) WinActivate($oIE) Local $oQueryUser= _IEFormElementGetObjByName ($oForm, "UserName" ) Local $oQueryPW = _IEFormElementGetObjByName ($oForm, "PasswordDisplay") Local $CompID = _IEFormElementGetObjByName ($oForm, "Domain" ) Local $oSubmit = _IEFormElementGetObjByName ($oForm, "loginBtn" ) Sleep(500) ;_IEAction ($oQueryUser,"focus" ) ;_IEAction ($oQueryUser,"selectall" ) ; Send ($LoginIDAA );this will work only for initial login, not for subsequent log in's after logoff. _IEFormElementSetValue ($oQueryUser, $LoginIDAA );this does not work. enters name in gray text, app does not think its there, but can see it. ;_IEAction ($oQueryPW, "focus" ) ;_IEAction ($oQueryPW, "selectall" ) ; Send ($PasswordAA );this will work only for initial login, not for subsequent log in's after logoff. _IEFormElementSetValue ($oQueryPW, $PasswordAA );this does not work. enters password in gray text, app does not think its there, but can see it. _IEFormElementOptionSelect ($CompID,0,1,"byIndex" ) Sleep(5000) If IsObj($oSubmit) Then $oSubmit.click() EndIf If $CloseAfSelAA = 1 Then Exit EndFunc Basically, i'm checking to see if the pages exists first, then either creating a page or attaching to a page depending upon the results of the check. I've also attached the source for the signon page for the web app. Note that the code delivered via the .hta for sign on is exactly the same. any and all suggestions are most welcome. I'm at my witts end here! Thanks in advance! (I love AutoIT! and this site!) view of signon screens.zip Company Application Signon Page.html