Long answer: For QTP/UFT GUI Tests it is VBScript only. If you require support for other languages, as of Version 12.50 if you have a UFT license you can start using LeanFT which offers C# and Java support. If Javascript support is introduced in the future, it will likely be in LeanFT.
Note that LeanFT requires VS or Eclipse IDE for script development and so far supports a subset of UFT GUI technologies. It comes with a UFT license, or can be purchased separately.
For more details see here:
leanft-help.saas.hp.com
Performance Tester/QA at Tata Consultancy Services
Real User
2014-07-17T17:57:29Z
Jul 17, 2014
As far as I know, VB script is the only language that is fully supported by UFT/QTP. Could you please elaborate the need, so that I can update you with a workaround.
The add-ins are included so that QTP can recognize certain
objects. Java add-in enables QTP to be able to identify
JAVA objects and use corresponding methods; similarly .NET
add-in helps QTP to identify .NET objects. A .NET window is
identified as swfWindow and not WinObject or Window Object.
Can we Use Javascript?
1. Any of the above languages can be used to
automate the QTP processes i.e. using QTP AOM. As far as
scripting the QTP scripts is concerned, VBScript is the ONLY
valid script.
EX: If you have a test suite of 3 different tests like - smoke
test, a regression test on module 1 and a regression test on
module 2, you can create and run an automation script from
lets say MS Visual Basic that loads the required add-ins for
a test, starts QTP, configures settings, run the test and
save it!
So, for Automating QTP processes(Controlling QTP From Outside) i.e. using QTP AOM, any of the
languages Quote from a documentation "You can write your QuickTest automation programs in any language and development environment that supports automation. For example, you can use: VBScript, JavaScript,
Visual Basic, Visual C++, or Visual Studio.NET."
2. For writing QTP scripts Using QTP IDE - ONLY VBSscript
NOTE: the last version of qtp I have used is qtp10.0
Unfortunately for now the only scripting language supported by QTP/UFT is VBscript.
However, HP has plans to have QTP/UFT accomodate more languages but that's in the future.
Our AI-powered functional testing tool accelerates test automation. It works across desktop, web, mobile, mainframe, composite, and packaged enterprise-grade applications.
Read white paper
Short answer: No
Long answer: For QTP/UFT GUI Tests it is VBScript only. If you require support for other languages, as of Version 12.50 if you have a UFT license you can start using LeanFT which offers C# and Java support. If Javascript support is introduced in the future, it will likely be in LeanFT.
Note that LeanFT requires VS or Eclipse IDE for script development and so far supports a subset of UFT GUI technologies. It comes with a UFT license, or can be purchased separately.
For more details see here:
leanft-help.saas.hp.com
Good to know. Thanks.
Thank you all for your feedback,it's greatly appreciated.
As far as I know, VB script is the only language that is fully supported by UFT/QTP. Could you please elaborate the need, so that I can update you with a workaround.
The add-ins are included so that QTP can recognize certain
objects. Java add-in enables QTP to be able to identify
JAVA objects and use corresponding methods; similarly .NET
add-in helps QTP to identify .NET objects. A .NET window is
identified as swfWindow and not WinObject or Window Object.
Can we Use Javascript?
1. Any of the above languages can be used to
automate the QTP processes i.e. using QTP AOM. As far as
scripting the QTP scripts is concerned, VBScript is the ONLY
valid script.
EX: If you have a test suite of 3 different tests like - smoke
test, a regression test on module 1 and a regression test on
module 2, you can create and run an automation script from
lets say MS Visual Basic that loads the required add-ins for
a test, starts QTP, configures settings, run the test and
save it!
So, for Automating QTP processes(Controlling QTP From Outside) i.e. using QTP AOM, any of the
languages Quote from a documentation "You can write your QuickTest automation programs in any language and development environment that supports automation. For example, you can use: VBScript, JavaScript,
Visual Basic, Visual C++, or Visual Studio.NET."
2. For writing QTP scripts Using QTP IDE - ONLY VBSscript
NOTE: the last version of qtp I have used is qtp10.0
Unfortunately for now the only scripting language supported by QTP/UFT is VBscript.
However, HP has plans to have QTP/UFT accomodate more languages but that's in the future.