Sign in to follow this  
Followers 0
MajeedAziz

AutoIt & Vmware Webclient Autologin

1 post in this topic

HI
 
I am struggling to get autologon to work on the VMware webclient webpage. We use this script for other site without a problem. But I am struggling for this website. logon.au3
 
I have also attached the VMware client webpage.html for your assistance.
 
The section I am struggling with is as follows it is not clear what variable I am to type.  Any ideas or direction would be great
 
I have tried
usernmae
password
 
Checked against chrome but not sure what to use.
 
local $_UserNameBoxName = "type:text"
 local $_PasswordBoxName = "type:password"
    local $_WebFormName = "loginForm"
 ; BlockAllInput()
 
 
 
 

Func LoginProcess()
 LogWrite("Entered LoginProcess()")
 
 ; References to HTML elements in the login process
local $_UserNameBoxName = "type:text"
 local $_PasswordBoxName = "type:password"
    local $_WebFormName = "loginForm"
 ; BlockAllInput()
 
 ; Check if there is a certificate Error
 If (IsCertificateErrorPage($g_IEInstance)) Then
  ContinueOnCertificateError($g_IEInstance)
    EndIf
 
 ; Make IE visible to user
    _IEAction($g_IEInstance, "visible")
 
 ; ------------------
 ; Handle login here (User Name, Password and Address are in the Relevant Parameters)
 ; Insert the Login Steps for the Connection Component
 ; Use $TargetUserName for the User Name
 ; Use $TargetPassword for the Users Password, ext.
 ; If more parameters are needed, edit the FetchSessionProperties Function below
 ; ------------------
 
 ; Using Non-Form based Login parameters
 ;~ ================================== ;
 _IELoadWait($g_IEInstance,$g_pIELoadWait_Delay,$g_pIELoadWait_Timeout)
 

    Dim $oLoginForm = _IEFormGetObjByName($g_IEInstance, $_WebFormName)
 ; Login form not found
 If ($oLoginForm = 0) Then
  MsgBox(0, StringFormat("Can't find requested form named [%s] (Extra details: %d, %d)", $_WebFormName, -1004)
    EndIf
 
 local $oUser = _IEFormElementGetObjByName($oLoginForm, $_UserNameBoxName)
 local $oPass = _IEFormElementGetObjByName($oLoginForm, $_PasswordBoxName)
 _IEFormElementSetValue($oUser, $g_pTargetUsername)
 _IEFormElementSetValue($oPass, $g_pTargetPassword)
 
 ; Login
 local $hndl = _IEPropertyGet($g_IEInstance, "hwnd")
 WinActivate($hndl)
 Send("{Enter}")
 
    LogWrite("finished LoginProcess() successfully")
    UnblockAllBlockProhibited()
EndFunc

vmware client webpage.html

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