Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Automated Testing and WebUI Test Studio > Telerik Testing Framework > WebAii Support for Testing Desktop Applications
These forums are read-only and serve as an archive for the previous versions of WebUI Test Studio.
For the current forums please go to the Automated Testing and WebUI Test Studio Forums

Not answered WebAii Support for Testing Desktop Applications

Feed from this thread
  • Jason Divis avatar

    Posted on Mar 19, 2010 (permalink)

    I see there is some support with interacting with the Desktop via the WebAii framework. And I have verified a bit of that framework by creating a simple form with a textbox and button. I can launch the form from my Nunit test (Process.Start), and can even utilize the Desktop.KeyBoard.KeyDown method to input some text into the form. The trouble comes when I try to Click the mouse.

    Dim Desktop As New Desktop 
    Desktop.Mouse.Click(MouseClickType.LeftClick, 200, 200) 
    MsgBox("Done"




    results in:

    System.NullReferenceException : Object reference not set to an instance of an object.

    I also tried moving the mouse

    Desktop.Mouse.Move(0, 0, 200, 200) 

    , and receive:

    System.NullReferenceException : The Settings.Current object has not been set. It is Null.

    I see that there is a way to define a Webaii settings configuration section, but I'm beginning to question the framework's ability to interact with a winform when the settings all have to do with browsers and URLs...

    Is there some reason the Mouse object needs these settings to interact with a webform when the Keyboard did not?

    Thanks in advance for your help.

    -J.




  • Nelson Sin Nelson Sin admin's avatar

    Posted on Mar 19, 2010 (permalink)

    Hello Jason,

    Thanks for the post. Unfortunately, the WebAii framework does not support WinForms applications as it does browser based web applications using page controls (Html, Ajax, Rad, Silverlight). So you would not have the full automation and verification features for your WinForms app as a Web App.

    But as you mentioned on your last post, it does simulate Desktop actions that you could use. I was able to reproduce the the error you are getting. In order to get around this error, you would have to instantiate a Manager object and and launch a browser like this:

    Dim m As New Manager(New Settings)
    m.Start()
    m.LaunchNewBrowser()
    m.Desktop.Mouse.Move(0, 0, 200, 200)
    MsgBox("Done")
    m.Dispose()

    Since the launched browser now has focus, you can then get a handle on your app's window using WebAii's Window class to reset focus:

    Dim w As ArtOfTest.Common.Win32.Window = New ArtOfTest.Common.Win32.Window(Process.Handle)
    w.SetActive()
    w.SetFocus()

    You can then use the properties of the Window class to help with what you are trying to do.

    All the best,
    Nelson Sin
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Automated Testing and WebUI Test Studio > Telerik Testing Framework > WebAii Support for Testing Desktop Applications
Related resources for "WebAii Support for Testing Desktop Applications"

WebAii Framework Features  |  Documentation |  Videos  |  Webinars  |  Automated Testing Tools  ]