Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can i create a variable for a treeview data
#1
Not Solved
I am testing windows application where data is in treeview.
How I can create a Expected Result for comparison .
I used array it says type mismatch
I used & VbCrLf & for new line bt its not working
Code:
ExpectedMembers="All Time "& VbCrLf &"Future Time "& VbCrLf &"Surrogate Member "
Reply
#2
Not Solved
Hi,
You have to extract data node wise. Make an array of expected members and compare that array values to the node values.
For eg,

Code:
For i =1 to no. of nodes
If MyTree.Nodes(i).Text = ExpectedMember(i) Then
Reporter.ReportEvent micPass, "Comparison", "Passed"
Else
Reporter.ReporterEvent micFail, "Comparison","Failed"
End If

This type of logic may work.
Please try this building your own logic.

Regards,
K
Reply
#3
Not Solved
Hi how can we take the no of nodes.
The actual value which I am taking from application is like
MemberNames =sModelMemberHier.GetContent()

Now how can I define the no of nodes

Can you please elaborate
Reply
#4
Not Solved
Hi Richa
Please share the SPY window snapshot of this particular treeview object.

Regards,
K
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP vb treeview object recognition error skozer 1 3,516 12-29-2012, 05:00 AM
Last Post: Ankur
  Error Can't Create Data table jsayre 0 2,645 10-01-2012, 11:20 PM
Last Post: jsayre
  How do I create a database checkpoint to validate data from xls NewAtQTP 0 2,436 02-25-2011, 05:18 PM
Last Post: NewAtQTP
  How to create a global variable in QTP galstar 1 7,389 08-04-2010, 07:34 PM
Last Post: supputuri
  Data Cell Variable Calculation AGrant 0 1,830 10-03-2008, 06:08 PM
Last Post: AGrant

Forum Jump:


Users browsing this thread: 1 Guest(s)