Version .... CLR 2 2006 vol2
I can access cell data in the table as in the following code but I'm not sure how to access grab the column names.
For i = 1 To CountColumns Col = SwfWindow("CaridianBCT Service Maintenanc").SwfTable("machineHistoryGrid").GetCellData(3, i)
Richard
Hello Ravi,
If I understand well your scenario, if your application using NetAdvantage version 12.1 and if you have installed TestAdvantage 12.1 at your machine, that you could use the code below to get the Column`s caption and Column`s key from your grid.
' Example how to use GetNAProperty to get Column`s key and Column`s CaptionDim captionDim columnKey
caption = SwfWindow("WinEditors Within WinGrid").SwfTable("ultraGrid1").GetNAProperty("DisplayLayout.Bands[0].Columns[1].Header.Caption")columnKey = SwfWindow("WinEditors Within WinGrid").SwfTable("ultraGrid1").GetNAProperty("DisplayLayout.Bands[0].Columns[1].Key")
msgbox(caption)msgbox(columnKey)
Please take a look at the attached video file with small demonstration
Let me know if you have any questions.
Regards
Hey Georgi,
Yes, i figured that out but the problem with me is that the application is developed using Netadvantage 2012.1 and the trial patch that i have is of TestAdvantage 2012.1...so will that do?
And if yes then please help me out to with some code pieces!
Regards,
Ravi Salunkhe
Thanks for provided information, but please note that you should use:
- TestAdvantage version which is the same with assemblies version of your Application Under Test - AUT . For example if your AUT using assemblies with version 9.2, you should have TestAdvantage 9.2, if your AUT using assemblies with version 12.2, you should have TestAdvanatge 12.2
- For environment Win XP (x32 bits) with QTP 11, you should have the mentioned patches in the screenshot.
Please let me know if you have any questions.
i have installed NetAdvantage 2011.1 and TestAdvantage 2010.0 on my machine now but still i'm still struggling to get the column names....actually i came across some weird behaviour after installing the Infragistics package. My existing code pieces were'nt able to execute and the script was throwing some random errors!(My sample recorded script prior installing TestAdvantage). After fighting for couple of hours i then disabled the TestAdvantage under settings and restarted my machine...luckily my script was able to execute further then.
So i'm still unsure as to why it wasnt working correctly after having the TestAdvantage installed...i'm Using QTP 11 and Win XP..am i missing out on some peripheral settings to get my script running?
Also, can you send me some sample code pieces to get the column names from the "UltraGrid"....and would be blessed if you sort out my TestAdvantage issue.
Have you been able to resolve your issue ? If you still have any concerns or questions I will be glad to help. If you need any additional assistance don’t hesitate to ask.