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 webtable checkpoint in QTP (UFT).
In this video, we will create a table checkpoint in Yahoo!. For a demo purpose, we will check the number of unread emails that shows up on the first page.
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?
Hi Ankur ,
I tried to get the number of unread mails but its displaying blank in msgbox counter
Could you please suggest me where i did mistake
@Venkat: Please put your code on the UFT forums.
Ankur,
I am new to QTP. Which is the best method to learn QTP? I have some knowlwdge of VB. Please advice.
Regards,
Vidya
i like the video. very helpful.
Hi Guys,
i have a problem running my scripts in different environment..
.
.
.
lets say these are my environments ho do i write a generic script to run them in all??
1.”how can i change the launch site “systemutil.run “iex..”,”which site should i launch here” ?
2.Checkpoints i have link checkpoints which also varies on different environment…
@kamal – to test the question issue you asked, you can just use IF statements.
Ex: If Question 1, then Answer 1
Else If Question 2, then Answer 2
Else If Question 3, then Answer 3
Presto! Look up “VB Script If Statements” plenty of samples to try out.
Can anybody help me with the following:
My application has 3 security questions. On login everytime 1 question is asked. how do I test this
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
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?
@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.
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”
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
@Tarik: Bingo!
I guess for the table the first row is for the header and second row starts with mail content.
Please correct me if wrong!!!