Page 1 of 1

.NET Error Provider Component

Posted: Thu Apr 02, 2009 12:50 pm
by rcd.guerra
Hi there crew,

we are having some issues related to the .NET Error Provider control.
We have forms where the user inputs data and the apply the changes to the database. Before applying the changes we validate the input and in case of error show an Error Provider next to each monitored control (Textbox, ComboBox, etc.).

Ranorex detects the ErrorProvider as Unknown. I could cast it to Control, and invoke the GetError() on it, but the ErrorProvider is not a control...

I could even use the InvokeRemotely but still i had to pass the ErrorProvider as a control or something but Rano finds it Unknow.

Any clean way to solve this ?

Thanks in advance!

Cheers,
Ricardo

Posted: Thu Apr 02, 2009 2:44 pm
by Support Team
You cannot access the ErrorProvider directly, but you can move the mouse on to the error provider and get the text of the ToolTip that pops up:

Code: Select all

Unknown errorProvider = ...;
errorProvider.MoveTo();
// wait for tool tip to pop up
Delay.Ms(500);
string textOfErrorProviderToolTip = ToolTip.Current.Text;
Regards,
Alex
Ranorex Support Team

Posted: Fri Apr 03, 2009 9:18 am
by rcd.guerra
Thanks Alex!

That might do the trick...

Cheers,
Ricardo