Hi,
I am using:QTP 9.5 with: TestAdvantage for Windows Forms (HP) Version 2007 Vol. 3 CLR2.0 Application under testing has: NetAdavntage 2007 Vol. 3 CLR 2.0 in win vista plateform.
In a praticular secnario I need to run a query which display the results in a window from where I need to retrieve the text from the status bar of a window pane.
For that purpose I have used a TextArea output value check point which retrieve the text from the status bar and I cam use that for other purpose. It works fine in windows xp. But while I run the script in vista for first few queries it works fine but for some queries it retrieve incorrect value which includes some character that is not appeard in the status bar at all. Can any body give me an alternate way to rerieve the text from the status bar. Because I believe the text area output check point or text output check point is not reliable in this case and some tiems return some incorrect value.
This is an urgent issue, can anybody from infragistics please help me.
Amar please help me out again since I am in trouble.
Thanks ,
Nabajyoti
Hi Nabajyoti,
Try this:
SwfWindow(...).SwfStatusBar(...).GetNAProperty("Panels[0].Text")
Replace 0 with the right panel index in your StatusBar.
Hope that will work.
Note: Please do not post the same question in multiple areas on the forums.
Regards,
Ammar
Hi, How can I use the WaitProperty in QTP with GetNAProperty? Lets say I want the test to wait until the status bar paenels[0] to have text "Ready".
Thanks,
Ritika
Hi Ritika
Unfortunately, GeTNAProperty does not support the “waiting” aspects that the QTP method WaitProperty has. I think you are looking for something like:
.SwfStatusBar(...).GetNAProperty(“Panles[0].Text”, “Ready”)
or to follow the naming convention that QTP has:
.SwfStatusBar(...).WaitNAProperty(“Panles[0].Text”, “Ready”)
However, you can implement your own logic by a simple for loop (in pseudo code)
Pass= FalseFor i= 0 TO [number of trials] currentText = .SwfStatusBar(...).GetNAProperty(“Panles[0].Text”) IF currentText = “Ready” Pass = True Brake END IF Wait(1) i = i+1END FORIF Pass = False Report an errorEND IF
You can also contact Infragistics support with a feature request to add a WaitNAProperty method to all TestAdvantage custom servers but that will only be created for newer versions.I hope this was helpful
Thanks Ammar.