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.
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.
Thank you very much Ammar. I have tryed the code that you suggested and it seems to be working.
And I am sorry for posting same question twoice.
Hi, How can I use the WaitProperty in QTP with GetNAProperty? Lets say I want the test to wait until the status bar paenels to have text "Ready".
The WaitProperty is a QTP specific method and not related to TestAdvantage, and as such I really don't know much about it. But in looking at it, it seems to work similarly to GetNAProperty in that the Property that is passed in can be a compound property such as:
but it cannot do complex properties such as:
That being said, if the property you need to get to is not an Indexed property, then you should be able to get to it, and wait for it with WaitProperty.
Unfortunately, GeTNAProperty does not support the “waiting” aspects that the QTP method WaitProperty has. I think you are looking for something like:
or to follow the naming convention that QTP has:
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.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