Highlighted
Rakesh_Geetla Absent Member.
Absent Member.
436 views

How to invoke uft script present in ALM using java script?

My requirement is to execute the UFT scripts based on the input given in html page. I came to know from some of the blogs that Microsoft has stopped vbs script usage in html. for that reason i want to invoke the qtp scripts using java script. I searched for the same and didnt find much information. If anyone can provide the equivalent code in javascript will be helpful. I am in short of time to experiment as the client demo is near.

--------------------------------------------------

Dim objQtpApp
Set objQtpApp=Createobject("QuickTest.Application")
objQtpApp.Launch
objQtpApp.Visible=False 'True
varUserName=document.getElementsByName('Username').value
varPassword=document.getElementsByName('Password').value

 

call QC_Connect(varUserName,varPassword)

Sub QC_Connect(varUserName,varPassword,varCustomsON)

'
objQtpApp.TDConnection.Connect "http://dddd.fed.test.com:7117/qcbin", "Domain", "Project", varUserName, varPassword,False

If objQtpApp.TDConnection.IsConnected Then

objQtpApp.Open "[QualityCenter] Subject\Automated Test Case Development\Test",False
objQtpApp.Test.Environment.Value("varUserName")=varUserName
objQtpApp.Test.Environment.Value("varPassword")=varPassword
objQtpApp.Test.Environment.Value("varCustomsON")=varCustomsON
objQtpApp.Test.Run
objQtpApp.Quit


Else
MsgBox "Cannot connect to Quality Center"
End If
End Sub

 

 

 

Tags (2)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.