1 year ago
#352660
Sailesh
Run Time error '1005' : Exception of type 'System.Runtime.InteropServices.COMException' was thrown for SSO login using VBA code. (UFT one)
We need to open UFT and connect to ALM thru excel macros for SSO login. (UFT version 15.0.1, ALM version 15 and Excel version Microsoft office 365,64 bit)
code to connect to ALM SSO login
Set objTDC = CreateObject("TDApiOle80.TDConnection")
objTDC.InitConnectionWithApiKey "http://<ALM server URL>:8080/qcbin","<Api-Key>","<Api-Key
Secret>"
objTDC.Connect "<Domain>", "<Project>"
approvalId= objTDC.GetApprovalID
code to open UFT and connect to ALM SSO login
Set a = CreateObject("QuickTest.Application")
a.TDConnection.ConnectWithApprovalID "http://<ALM server URL>:8080/qcbin", "<Domain>", "
<Project>", "<UserName>","" , approvalId, False
'getting Error at the above line.
Error description - Run Time error '1005' : Exception of type 'System.Runtime.InteropServices.COMException' was thrown.
Note 'Connection for Non SSO login is working fine in same excel macros and version of UFT and ALM. below is the code for Non SSO login. Code for Non SSO login.
set tdc = TDConnection
tdc.InitConnectionEx server
tdc.Login login_name, password
Set qt = CreateObject("QuickTest.Application")
qt.TDConnection.Connect server, domain, project, login_name, password, False
tdc.Connect domain, project
vba
single-sign-on
hp-uft
alm
0 Answers
Your Answer