Hi there, I'm currently running on a trial license (of both QTP and TestaAdvantage) so I hope someone can help me quickly!
I am running QTP 9.5 with the .NET add-in; TestAdvantage 2008V1 CLR2, and the application I am testing is written in C# and using NetAdvantage 2008v1 CLR2, so the versions of test and net advantage do matchup.
Here's my problem: I want to be able to retrieve a value from a cell within an UltraWinGrid, when I record a simple click on a cell, QTP records this:
SwfWindow("EMS - Tomi").SwfObject("SwfObject").PaneActivate "Positions"SwfWindow("EMS - Tomi").SwfTable("grid").ActivateRow "10"SwfWindow("EMS - Tomi").SwfTable("grid").ActivateCell "10","Futures"SwfWindow("EMS - Tomi").SwfTable("grid").SelectCell "10","Futures"
When I immediately replay this script, I get an error on the second line (ActivateRow), this error says simply 'General Run Error' and then lists the line in error. Then if I 'skip', the following two lines also throw back the same error. I can seem to access various properties of the grid in a slightly different fashion, for example when I write a script like this (copied from a bit of code that is in one of the samples provided with TestAdvantage):
Dim gridSet grid = SwfWindow("EMS - Tomi").SwfTable("grid").ObjectSet col = grid.DisplayLayout.Bands.getItem(0).Columns.getItem(0)msgbox col
'col' in this case DOES return a value no problems. The only thing is that I am not familiar with the syntax when using the 'Object' method of getting properties, so I don't know if I can access or even set cell properties using this method (The help doesn't seem to provide any examples), and ideally I would like to get to the bottom of why a simple method such as ActivateCell is causing an error.
Does anyone have any ideas?
Many thanks, Ryan.
Hmmm, an interesting twist to the story: When I record an interaction with a different application (this one being a 'test' app and is much simpler in the sense that the grid is not contained within a large heirachy of containers) and replay that, then I CAN subsequently successfully replay the script in my first post!
It seems that whenever I restart QTP, I have to interact with this other application first before my recorded scripts work with my original application I am actually trying to test. Bizarre. I would like to try and find a solution that doesn't involve me having to interact with this other app before I can run my tests.
Cheers, Ryan
Hello,
Did you get a resolution to your issue? We seem to be facing the same problem at our end. During playback if we first play back on a nativ infragistic object we are able to play back on our own application which has inherited controls. If we do not start the playback from nativ infragistics objects then the playback fails.
Kindly let me know if you have any solutions for it.
Regards,
Malayaj