.NET Error Provider Component

Ask general questions here.
rcd.guerra
Posts: 29
Joined: Tue Mar 03, 2009 11:43 pm

.NET Error Provider Component

Post by rcd.guerra » Thu Apr 02, 2009 12:50 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Thu Apr 02, 2009 2:44 pm

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

rcd.guerra
Posts: 29
Joined: Tue Mar 03, 2009 11:43 pm

Post by rcd.guerra » Fri Apr 03, 2009 9:18 am

Thanks Alex!

That might do the trick...

Cheers,
Ricardo