Quick Test Professional (QTP) Test Automation guide

Web Name: Quick Test Professional (QTP) Test Automation guide

WebSite: http://www.qtphelp.com

ID:207993

Keywords:

Professional,Test,Quick,guide,Automation,QTP,

Description:

keywords:
description:

This is a help and support site for everyone for tips, tricks and tutorials on QTP / UFT, automation frameworks concepts. If you are planning to do HP Certification, this is the place to learn...

PagesHomePublish your article @ QTPhelp.comContact us Thursday, July 24, 2014 UFT/QTP does not identify an ObjectHere are some things to Try when UFT is not recognising objects

1. Open QTP/UFT first

While testing on any app, make sure QTP is opened first and then your application. QTP works by lookinginto your application. If you open QTP after your application has started there are chances that QTP may not be able to identify objects

2. Load Relavant Add-ins

Make sure you have loaded ALL the relevant add-ins required for your Application Under Test (AUT).

3. Record and Run Settings

While working on web based applications,make sure Record and run test on any open browser is selectedunder Record Record and run settings.

4. BHO (Browser Helper Object
) Manager
Make sure BHO Manager in IE underToolsManage Add-OnsEnable or Disable Addonsis enabled.

5. Enable Extensions

If you are working on Firefox or Google chrome browser, dont forget to enable browser extensions.
In case of Firefox go toFirefox menu Add-ons Extensionsand enableUnified Functional Testing Extension.
For Chrome go toTools Extensionsand enableUnified Functional Testing Agent.


6. Disable Protected Mode

In IE, clear theEnable Protected Modeoption underTools Internet Options Security

7. User Account Control

UAC was introduced in Windows Vista and continued in Win 7 and Win 8/8.1. UAC can interfere with your application. It is a good idea to disable it while working on QTP.To turn-off UAC in Windows 7, go toStart Menu Search for Change User Account Settings Disable UACTo turn-off UAC in Windows 8/8.1, you need to take help of registry. UI setting doesnttrulyturns-off UAC in Win 8/8.1. HitWin + Rkey, typeregeditand click OK. Navigate toHKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\SystemFind the key:EbableLUAand change theValue Datavalue to08. Zoom LevelMake sure the zoom level is set to 100% while testing in any browser. Check the illustration below on how zoom-level affects highlight object functionality in QTP. (Focus on the blinking black rectangle on the left once theHighlightbutton is clicked on the right.)
9. Object NotationThere are times whenidentification propertiesare not enough to identify an object. You may make use ofnative propertiesin that case. Use .object notation to locate the erring property. Make sure to correctly identify it.
10. Low Level Recording (click here for different recording modes in QTP)After you have exhausted all options you can try Low level recording. Its not a good method from maintenance point of view but it may come handy at times.
11.If your QTP worked well for some days or months and suddenly stopped identifying objects, that has happened probably there is some change in your browser or UFT software itself. Try to disable auto-updates on machines where QTP is installed.
12.If youre testing cross browser, dont useTypeproperty to identify Webbutton class since the default value is different for IE (button) and Firefox (Submit).
13.If QTP was successfully able to identify object at record time but unable to identify the same object during replay time, there are chances that object properties are dynamic in nature. Make use ofregular expressionor parameterization to handle those dynamic values.
14.Make sure the version of QTP you use supports the version of your browser and/or your Windows operating system.

Also read, How to handle dynamically changing objects in UFT?1 comment: How to associate Function Libraries to test in QTP/UFT??When you are creating QTP/UFT scripts or designing any Framework, you will need to associate Function Libraries to them. This can be done Manually or even through scripting.

Here I would like to show you both the ways of Associating a Function Library. The Association can be made in 4 ways.
Using File- SettingsUsing AOMUsing ExecuteFilemethodUsing LoadFunctionLibrary method
1. Using File-Settings
This is the common and manual method of associating the Function Library. Find below the step by step procedure of doing it
After opening the Test, click on File menuClick on Settingsunder file menu. You can see a Window open with name Test SettingsHere, click on the Resources on the left tab. You will see a new Frame in right showing Resources and a empty box belowHere we can click on the plus (+) button and browse and select the function library we need to associate.After adding the libraries, click on Applyand OK.
2. Using AOM
AOMmeans Automation Object Model. This is a mechanism using which one can control various operations from outside the QTP. Using AOM, we can even write a code to open QTP test and associate Library Function.

AOM to open QTP test
'Open QTP
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Launch
objQTP.Visible = True
'Open a test and associate a function library to the test
objQTP.Open "C:AutomationSampleTest", False, False

AOM to associate a library

Set objLib = objQTP.Test.Settings.Resources.Libraries
'If the library is not already associated with the test case, associate it..
'If library is not already added
If objLib.Find("C:SampleFunctionLibrary.vbs") = -1 Then
'Associate library to test case
objLib.Add "C:SampleFunctionLibrary.vbs", 1
End


3. Using ExecuteFile method


ExecuteFile statement executes all the VBScript statements present in the specified file, thus making all the functions, sub-routines and other elementsavailable to the action as globally. This is how to use the ExecutionFile method:


'Action begins
ExecuteFile "C:YourFunctionLibrary.vbs"


4. Using LoadFunctionLibrary


LoadFunctionLibrary is a new method which was introduced in QTP 11, which would allow us to load a function library when the step runs. We can load multiple function libraries in a single line using a comma delimeter. This is how to use the LoadFunctionLibrary method:


'Associate a single function library
LoadFunctionLibrary "C:YourFunctionLibrary_1.vbs"
'Associate more than 1 function libraries
LoadFunctionLibrary "C:FuncLib_1.vbs", "C:FuncLib_2.vbs"No comments: Saturday, June 28, 2014 Facing problem in UFT 11.5 with Find (Ctrl + F) and breakpoints ??Are you facing problems to perform "Find (Ctrl + F)"operation and adding "Breakpoint" in UFT ??Unified Functional Tester will not support these 2 operations for the .vbs and .qfl files. It is supported only to the Tests.
So how to perform these 2 operations in your library files ?
Here is the solution for it.
Associate the library function to the Test or Action. by doing this, we can perform Find and Breakpoint operations.
How to Associate file :1. Open the library file, right click on the tab of the library file and click on "Associate Function Library With"

2. Go to File - SettingsSelect Resources in the Test Settings Dialog and add the Resources by clicking on the "+" button


1 comment: Friday, December 9, 2011 Error starting JBoss server after QC (ALM) installationProbable error message when you run the run.bat file
"Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Press any key to continue . . ."
or
"There was an error starting JBoss server"
or
"Unable to start the JBoss server"

The Solution:
This error is because of heap memory allocation for the JBoss server. By default Application Life-cycle management (Quality Center) tool allocates memory based on the RAM size of your computer. Unfortunately Java 32-bit version supports only a maximum heap size of 1536MB only.

64-bit Windows

If you are using 64-bit windows, check if you have 64-bit Java installed. For resolving the issue, uninstall your 32-bit Java and install 64-bit Java.

If you do not wish to Uninstall/Reinstall, ie want to continue using the same Java, then follow the steps specified in 32-bit windows section below.


32-bit Windows
If you are using 32-bit windows, you need to decrease the heap size of JBoss server. How to do that?
1) Go to your ALM path (By default it will be "C:\Documents and Settings\All Users\Application Data\HP\ALM")
2) Open the folder named JBoss
3) Open the folder named bin
4) Locate a file named run.bat
5) 'Right-click' on the file and select 'edit'
6) Look out for a line similar to "set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m -XX:MaxPermSize=256M". It may not be the same exact line, depending on your RAM the ALM installation would have different values. The two 1024 may change and teh 256 may change, remaining would be the same.
7) After locating the line, change it so something like "set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx512m -XX:MaxPermSize=256M" so that the total size is not going above the 1536MB.
8) Save the file
9) Double click on "run.bat"

Within a couple of minutes, you should see JBossXXXXXX Started in XXXX ms


Related Posts:
How to download Quality Center?

How to extract Quality Center files?
How to install Application Lifecycle Management (ALM) platform?
How to configure the Application Lifecycle Management (ALM) platform?2 comments: Thursday, December 8, 2011 How to Install QC 11 (Quality Center) / Application Lifecycle management (ALM) 11? Part 2 Extracting the filesThis is second part of four-part series on How to Install QC 11 (Quality Center) / Application Lifecycle management (ALM) 11

Clickon the first partif you landedon this page accidently/missed the first part on How to download QC 11 (Quality Center) / Application Lifecycle management (ALM)

1) Ensure that both the files are downloaded in the same folder, if not ensure you copy the files in the same folder.


Click on the image to enlarge 2) Ensure the names are same except for the extension (Viz Software_HP_ALM_11.00_Windows_TC096_15000.zip Software_HP_ALM_11.00_Windows_TC096_15000.z01)

3) Install winrar if you dont have it already. You can download it here

4) Now, right click on the zip file we downloaded (viz Software_HP_ALM_11.00_Windows_TC096_15000.zip) and select the option Extract to Software_HP_ALM_11.00_Windows_TC096_15000

Click on the image to enlarge5) It will create a new folder in the current directory as shown below.

Click on the image to enlarge6) Wait for the extraction process to complete

7) Now open the newly created folder, it will contain a file named TC096-15000.iso, repeat the same step as above. Viz Rightclick on the.iso file and select Extract to TC096-15000

8) This will create a new folder in the current directory as shown below

Click on the image to enlarge9) Wait for the extraction process to complete, comparatively it will take more time now.

10) After extracting open the newly created folder, it will contain the below folders

Click on the image to enlargeWe now have all the files we need for installing Quality center 11 aka Application Lifecycle Management 11.

This is the end of Part 2 - Extracting the software, please continue with How to Install QC 11 (Quality Center) / Application Lifecycle management (ALM) 11 Part 3 Installingthe ALM platform

Also Read,
ALM- QTP integration
A sample framework forALM QTP integration 6 comments: Older PostsHomeSubscribe to:Posts (Atom)Total PageviewsTopicsActions(3)Addin/Plugin(1)Automation(19)Breakpoints(1)Checkpoints(4)Datatables(6)Frameworks(6)Funtion Library(3)HP Certification Questions(13)Installation(3)Interview Questions(17)Keyword/Expert Views(4)Object Repository(7)Objects/Object Identification(6)QTP Issues(11)QTP Scripts(23)QTP Tips(25)Quality Center (QC)(14)Recording Modes(4)Recovery Scenarios(1)Regular Expressions(1)Reporter(3)Screenshots(15)Tutorials(37)VB Scripts(11)FollowersPopular Posts25 VB / QTP scripts to pep youSince the subscribers wanted all the scripts to be available in a single page, I have compiled this page with all the scripts we have posted...VBScript Program to reverse a string without using strreverseProgram to reverse a string without using strreverse MyStr = inputbox(Enter the String:) nCnt = Len(MyStr) For i = 1 to n...QTP script to login to Gmail using different sets of logins from datatable In the following example there is no need of recording any scripts. Just copy paste the below script and it should work provided you meet t...Datatable - Import/ExportThere are 4 methods that QTP provided to Import/Export a datatable to/from an .xls file. 1) Import method : This method is used to import ...VBScript code to check if a string is Palindrome or notProgram to check if the given string is a Palindrome or not MyStr=Ucase(inputbox(Enter the String:)) RevStr=strreverse(MyS...File Types in QTP (File Extensions)I have compiled a master list of different file extensions used in QTP. Please let me know if I have missed anything here. QTP File Types:...How to integrate Quality Center (QC) VBScript program to display the prime numbers PrimeNumberLimit = inputbox(Enter the range till (ex: 50):) Getting the...Advantages and Disadvantages of QTP (Quick Test Professional) Hi everybody, I have put together some of the advantages and disadvantages of Quick Test Professional tool below. As usual, if you feel any...How to integrate Quality Center (QC) QuickTest Professional (QTP: Have you read the First part of this article? Add-in requiremen...Search This BlogLike us on FacebookSubscribe To QTPhelpPosts Atom PostsAll Comments Atom All CommentsRelated SitesQuick Test Professional blogLive Traffic
Blogger list
Blog Adda
Blogger now
Top Blog Area
Blog Listing
Bloggernity
Bloggerama
Blog Top List
Top of Blogs
Blog Rankings
Bloggapedia
QTPhelp.com. Simple theme. Powered by Blogger.

TAGS:Professional Test Quick guide Automation QTP 

<<< Thank you for your visit >>>

Websites to related :
爱游戏体育平台靠谱 - 爱游戏体育

  keywords:爱游戏体育平台靠谱,爱游戏体育平台,爱游戏官网登录
description:&#9728;&#65039;爱游戏体育平台靠谱 - 爱游戏体育平台 - 爱游戏官网登录(老品牌-安全

Leading Low-Level Laser Technolo

  keywords:
description:Erchonia is the world leader in LLLT technology dedicated to producing safe, effective solutions for chiropractors, physical the

_官方网站

  keywords:&#24425;&#31080;&#19979;&#36733;&#97;&#112;&#112;
description:&#24425;&#31080;&#19979;&#36733;&#97;&#112;&#112;尊贵如你值得拥有&#24425;&#3108

Heavens Within Earth

  keywords:
description:
Skip to main contentHeavens Within EarthSearchSearch This BlogPostsBullshit SiddhisNovember 17, 2016 Nsala malongo, So.....

Ashland MS Criminal Defense Atto

  keywords:
description:When you are facing legal challenges, do not face them alone. Contact the Ashland, Mississippi, law firm of Farese, Farese & Far

1001Games - Play 3500 free onlin

  keywords:
description:The newest and best games gathered on 1 website! Our site contains more than 3500 games!
Play games at 1001Game

The Art of Spagyrics

  keywords:
description:
The Art of SpagyricsNot many people know what spagyrics mean. My own knowledge doesnt surpass that of definitions found in book

Crucible.org

  keywords:
description:
HOME| BOOKS | DVDs-CDs | COURSES | LABWARE | GALLERY

Wigs Toronto | Hair Extensions |

  keywords:
description:Wigs Stores in Toronto For Both Woman & Men, Virgin European Human Hair Wigs and Men Hair System and Custom Wigs are all availab

Senior Respite Care - In-Home C

  keywords:
description:FirstLight Home Care is an in-home care agency for seniors & adults - Count on our caregivers to provide the very best care.

ads

Hot Websites