[Mono-list] Mono and Automation tools
Steven Schulze
sschulze at vmware.com
Tue Jul 24 11:52:58 EDT 2007
Hi all,
We are running into a problem when we try to use automation tools on an app
running on Mono on Windows. Our automation tool (SilkTest) uses the native
Windows class for each control to determine what kind of control it is
(BUTTON, STATIC) etc. On .Net, new Windows classes are registered for each
control type, but they are still unique enough that you can map them to your
own SilkTest classes. While we can use the .Net extension of SilkTest to
automatically give us all the class details (methods, etc of each control) we
obviously cannot use this on Mono. because of this we also don't use it when
we run our app on .Net, since we want to create an environment where we can
seamlessly test our app on both .Net and Mono.
The problem is that on Mono, all controls are registered as the same class,
namely "Mono.WinForms.0.40". This gives us no way to map each control type
to our own SilkTest classes. Unfortunately SilkTest is not flexible in how
it recognizes controls and we are stuck with using only the native Windows
class.
Is there a way to specify a unique name for each control type in Mono, so
that the registered class for each type is unique? I am thinking something
along the lines of "Mono.WinForms.0.40.MyFancyButton" or something. On .Net
you can override the get method of Control.CreateParams and modify the
ClassName member of CreateParams, which will then embed that name in the
final Windows class (although you need to ensure the class is registered 1st
with Windows). This can then be mapped to a SilkTest class. On Mono, the
CreateParams.ClassName seems to be ignored completely.
Does anyone know if there is a way to do this, other than modifying the Mono
source code?
Note that this is only used during automation testing on Windows using ,Net
and Mono, and this code will be disabled/ifdef'ed out later on.
Thanks!
Steven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070724/274be4f3/attachment-0001.html
More information about the Mono-list
mailing list