Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check for sorting functionality through QTP
#1
Solved: 11 Years, 4 Months ago Exclamation 
Hello,


I am stuck on one issue. I need to know how to check that the table has been sorted after clicking on the header link.

The page has 5 tables on it and i want qtp to be able to click the header, and check to see if that table has been sorted.

I have attached an image

Please help.


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 4 Months ago
Hi,

Spy on the header and try to identify what object it is. If it is clikable then perform the click operation on it and verify the result.

Let me know in case of any help required.

Regards,
Sankalp
Reply
#3
Solved: 11 Years, 4 Months ago
Yes, i can identify the object but that doesnt really help with the sorting. I need to be able to check when after clicking the header, whether or not the table is sorting the data.
Reply
#4
Solved: 11 Years, 4 Months ago
load the data of the column that you want to check the column(sort data) into the datatable global sheet and then compare the values row1 with row2 and row2 with row3 and so on


Code:
dim x,i,k,flag
flag=false
k=1
rowcount=datatable.rowcount

for i=1 to rowcount  
datatable.setcurrentrow i
x=datatable.value("column header",dtglobalsheet)
if x>k then
k=x
flag=true
else
msgbox "your result is fail"
exit for
end if
next

if flag=true then
msgbox "the data is sorted"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Gmail: Compose Mail Functionality kishore.gkk 5 9,891 02-15-2013, 08:39 AM
Last Post: newqtp
  Need help for Enterkey functionality mahesh1612 4 3,538 11-23-2011, 01:51 PM
Last Post: Acharya_silu@yahoo.com
Exclamation Functionality bugs... Unleash Rajesh 4 3,745 07-26-2011, 09:32 AM
Last Post: Unleash Rajesh
  Does QTP 9.0 supports drag & drop functionality check for webelement? jyotikrushna 1 4,164 01-13-2010, 01:33 PM
Last Post: 1981.madhu@gmail.com
  Sorting the data prasanna 1 1,980 04-06-2008, 08:46 PM
Last Post: niranjan

Forum Jump:


Users browsing this thread: 1 Guest(s)