Forum Discussion
Hi Tanya,
Thanks for your reply.
As you suggested, i tried to execute script using DbgServices and launch tested applicaition to trace the exceptions and to obtain call stack data with the below piece of code. i am getting the "First chance exception" error log.
Please refer the attached screen shot for the log i got when executed the below code and kindly help how to resolve this error mentioned above to proceed further and to find out the reason for application crash.
Sub Main
Set launchTestedApplication = DbgServices.LaunchTestedApplication
DbgServices.Options.EnableEvents = True
DbgServices.Options.ActiveExceptions = True
Log.Message("Exceptions are being traced.")
''''To login into application with valid credintials
call ApplicationLoginUser("vbulus1","Setup2000")
End Sub
Function ApplicationLoginUser(ByVal sUserName, ByVal sPassword)
Dim oApp,oUserName,oPassword,oLogin,oLogout
Dim arrProp,arrUNVal,arrPwdVal,arrLBVal,arrLOVal
Dim iChildDpt,bFound
iChildDpt= 20
arrProp = Split("Name|Visible","|")
arrUNVal=Split("UIAObject(""UserId"")|True","|")
arrPwdVal=Split("UIAObject(""Password_2"")|True","|")
arrLBVal=Split("UIAObject(""Login_2"")|True","|")
arrLOVal = Split("UIAObject(""Log_out"")|True","|")
Set oApp = oProcess
Set oUserName = oApp.Find(arrProp,arrUNVal,iChildDpt,False)
Set oPassword= oApp.Find(arrProp,arrPwdVal,iChildDpt,False)
Set oLogin = oApp.Find(arrProp,arrLBVal,iChildDpt,False)
delay(2000)
IF oUserName.Exists Then
oUserName.SetValue sUserName
oPassword.SetValue sPassword
Delay(3000)
If oLogin.Exists THen
oLogin.Click
Delay(15000)
oApp.Refresh
Set oLogout = oApp.Find(arrProp,arrLOVal,iChildDpt,False)
IF oLogout.Exists Then
bFound = True
arrPUVal = Split("UIAObject(""Popup"")|True","|")
Set oPopup = oApp.Find(arrProp,arrPUVal,iChildDpt,False)
If oPopUP.Exists Then
If oPopup.Child(0).ObjectIdentifier = "BusyChildWindow" Then
While oPopUP.Child(0).Exists
Delay(1000)
oApp.Refresh
wEnd
End If
End IF
Set oPopup = oApp.Find(arrProp,arrPUVal,iChildDpt,False)
If oPopUP.Exists Then
Log.Warning("Unable to Load Work Flow module")
arrOkVal = Split("UIAObject(""Ok"")|True","|")
Set oOK = oPopup.Find(arrProp,arrOkVal,iChildDpt,False)
If oOK.Exists THen
oOK.Click
End If
End If
Else
bFound = False
End if
Else
Log.Error("Login Button Not found")
bFound = False
End if
Else
Log.Error("Login Page Not found")
bFound = False
End if
ApplicationLoginUser = bFound
Set oApp = Nothing
Set oUserName = Nothing
Set oPassword= Nothing
Set oLogin = Nothing
Set oLogout = Nothing
End Function
Thanks & Regards,
Vara Prasad
Related Content
- 12 months agoSiKing
- 3 years agoSK2
- 4 years agosimonaferrara
Recent Discussions
- 12 hours agoSvetaG