.

Video: How to create a table checkpoint?

QTP does not provide the facility to create a direct table checkpoint but it is possible to create it by using standard checkpoint on an object and then navigating up the hierarchy. Here is a video to show you the process of how to create a web-table checkpoint.

In this video, we will create a table checkpoint in Yahoo!. For a demo purpose, we “ll check the number of unread emails that shows up on the first page. [In case you find the resolution is not very clear, the annotations are provided for easy understanding.]

How to create a table checkpoint in QTP?

With the help of table checkpoint you can navigate to a particular cell, click on a link inside a cell… the possibilities are endless.

Trivia: For…Next loop in the video starts with 2 and not 1, can someone tell the reason?

Have you downloaded the FREE Optimizing QTP eBook yet? Get It Now!

If you want to keep track of further articles on QTP. I recommend you to subscribe via RSS feed. You can also subscribe by Email and have new QTP articles sent directly to your inbox.

8 comments ↓

#1 Tarik Sheth on 11.12.08 at 23:08

I guess for the table the first row is for the header and second row starts with mail content.

Please correct me if wrong!!!

#2 Ankur on 11.22.08 at 10:27

@Tarik: Bingo!

#3 Ramya - The Designer on 11.22.08 at 22:00

Hello Ankur

Sorry to post my Query here

i need your assistance in automating my project

Here is the information abt what I am doing manually and what I want to automate:

I go to a Website…. Export a list arranged in IDs.

(using QTP I can import Excel Sheet…that part is fine)

Command Prompt

I will select a ID , copy its related File from Network share using command prompt

Into my Desiredfolder>copy \\Networkapth

I will open dat file related to SID:1

This File will have files( with folder icon) say with an Extension .xxx . We cant straightaway exceute dis files …we need to copy this files back to the Desired folder Where its Parent is located

Now We have Desired folder

File and its child files with .xxx extension

Now I will rename all .xxx to .yyy for the Exceuteable tool to run the files ( as the executable tool cant run .xxx so we have to convert them to .yyy)

this I can do by

Desired Folder> Rename *.xxx *.yyy

Command Prompt

Now I will open another command prompt

change the Directory where that Executable tool is located

Excecutable File Location>Executable.exe "Desired folder\*.yyy"

This will execute all files .yyy extension in Desired folder

Each .yyy file results will be saved in temp folder with in sequential order
as log1,log2 and so on

now suppose the SID:1 has some 5 .xxx then will have the results of those .xxx files in log1…… log5 folders in Temp folder.

When we select SID:2 which has some 5 .xxx files in it and do the same steps we will have the Results of SID:2 .xxx files stored as log6 ……. log10.

I want to logs to referenced with SID:1 ,SID:2 and so on instead of them being saved as log1,log2 and so on………….

If this is done then we can open the results referenced with SID
and check the results and make a Descison on SID. is it… possible for reports of Log to be saved with SID reference.

in the Command prompt we will use three commands for all SIDs

1.Copy

2Rename

3.clr

After SID:1

go to execel copy SID:2 , replace SID:1 with SID:2 in the copy command copy SID:2 file

copy .xxx files and Rename to .yyy files

In the Command prompt Will use two command

1.Excecutable File Location>Executable.exe "Desired folder\*.yyy"; and

some times in between the execution of log a red screen with some text is shown and excution halts.

In that case We have to stop execute by pressing any key in command prompt2 and type cls( to clear screen) go to the “Desired folder” Delete the previously excecuted logs and come back to command prompt 2 and execute

Excecutable File Location>Executable.exe "Desired folder\*.yyy"

2. cls ( after all .xxx files which are converted into .yyy are excecuted for each SID)

Now my question can the automation tool can recoginize( atleast can it recognize the failed text… there will some text in red ) the Red screen and stop excution on its own and go back to desired folder and delete previously exceuted logs with.yyy extension and come back to the Command prompt 2 and restart executing the logs from where it left.

( I believe checkpoints concepts help here… but not sure how to use them effectively here)

I will be really thankful if u let me know the feasibility of the above scenarios.

Kind Regards

Prashanth

#4 Shibu on 12.10.08 at 02:06

Hi,

I tried creating Table Checkpoint.
But i got problem while executing.

I generated a script of opening a Excel sheet in my system, while i tried inserting Standard Checkpoint for table, i can’t see the options for checkpoint inserts for row and column.

SystemUtil.Run “My Computer”,”",”",”open”
Window(“My Computer”).WinListView(“SysListView32″).Activate “DATA (D:)”
Window(“DATA (D:)”).WinListView(“SysListView32″).Activate “Shibu”
Window(“Shibu”).WinListView(“SysListView32″).Activate “Lunch”

#5 Ankur on 12.10.08 at 05:12

@In the video, we have discussed scenario for web table and not MS Excel.

For opening and doing other operations on excel you need to work on the Excel Automation Model. Refer my posts on QTP and Excel to begin with.

#6 Document Object Model(DOM) and QTP – A complete guide. | Learn QTP on 12.26.08 at 01:59

[...] of the very important places you can use it is when a QTP web table checkpoint doesn’t show you the desired content in a cell. I mean the content in the cell is in a format [...]

#7 Lee Rector on 03.08.09 at 11:20

Have a problem with QTP attempt to insert table checkpoint.

Ankur – I am following the tutorial for working with the web flight app. The checkpoint chapter(specifically capturing the $270) cell value is causing my record to freeze or just not capture the table at all. This is QTP 9 version and happens when I attempt to record from the middle of my existing test. – attempts to capture from the active window as the tutorial instructs also locks up the system. whats the deal?

#8 prabhu_tracker on 06.08.10 at 14:36

Browser(“Browser”).Page(“Yahoo! Mail: The best”).WebEdit(“login”).Set “name”
‘Browser(“Browser”).Page(“Yahoo! Mail: The best”).WebEdit(“passwd”).Set “name”
‘Browser(“Browser”).Page(“Yahoo! Mail: The best”).WebButton(“Sign In”).Click
‘wait 8
‘Browser(“Browser”).Page(“(1 unread) Yahoo! Mail”).Link(“Inbox”).Click
‘wait 9
‘rows=Browser(“Browser”).Page(“Inbox (1) – Yahoo! Mail”).WebTable(“Inbox”).GetROProperty(“rows”)
‘For i=2 to rows
‘If Browser(“Browser”).Page(“Inbox (1) – Yahoo! Mail”).WebTable(“Inbox”).GetCellData(i,1)=”Unread” Then
‘counter=counter+1
‘End If
‘Next
‘Msgbox counter

Leave a Comment