I would like to know if it's possible to test that on a user action the errorProvider pops an error icon beside a control?
I tried to just add a ControlTester on my errorProvider but it throws an NoSuchControlException error...
Am I doing something wrong, or it's juste impossible?
oups wrong place, sorry!
Sorry again! :s it was the good place!!
I had someone ask this before.. I think the problem is that ErrorProviders are not Controls; instead they are Components. It should not be impossible to get them, but I don't think the code supports it.
in order to check if an error provider pops an icon you have to check if error message is empty. I use a little helper method for this:
private static string DXErrorMessage(Control control)
return new DXErrorProvider().GetError(control);
ControlTester memoText = new ControlTester("mEModifyText", formName);
I use DevExpress ErrorProvider, but this should works with plain .net ErrorProvider too.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.