Clicking a wpflist item
Posted on 2013-05-20
I'm currently trying to create some automated tests using QTP and the application has an object which is being recognised as a wpflist object. The code below will select an item in the list however I'm trying to simulate a right click mouse action on an item which will bring up another menu or even a left mouse click so I can position the mouse on the correct item. The automation tool QTP uses VBScript as its language however I can create an instance of a .Net object using the DotNetFactory object and access its methods and properties. Any ideas?
Set wActiveEvents = WpfWindow("Active Events").WpfList("eventList")
For i = 0 to wActiveEvents.Object.Items.Count - 1
lineEventNo = wActiveEvents.Object.Items.Item(i).AgencyEventId
If strComp(trim(lineEventNo),trim(eventNo)) = 0 Then
wActiveEvents.Object.Items.Item(i).Selected = True