I am using QTP version 11.00 with .NET and VB add-ins and I have TestAdvantage version 2008 vol 2 installed. The application is a VB .NET application developed with NetAdvantage version 2008, vol 2. The control is an Error Provider control that displays a red exclamation point that displays error text when the user hovers over it with the mouse. I tried to use GetErrorProviderText but only returned an empty Msgbox. Has anyone run across and issue like this and if so, how did you handle it?
I have attached a sample application that illustrates the error text.
Thanks in advance
Fred
Hi Fred,
Short answer, unfortunately there is no way to get the error text in the sample provided without some modification. The error provider is component that extends the functionality of a control, and QTP primarily only interacts with controls. Since the value is only in the component and not in the control or window, the value cannot be validated directly. The best solution for something like this that we can offer is to set a property on the control with the value of the text at the same time you set the error provider text. Something like :textEditor.Tag = "This text editor has error"
which you can then access in the QTP script via:
msgbox SwfWindow("QTP Error Provider").SwfObject("textEditor").GetNAProperty("Tag")
Hi Michael,
Thanks for your time to research this issue. I was afraid that you would be telling me this. I will look into this and see where it'll take me. Again thank you for your time.