net managed automation API (Refered to as SWA from now on) which is under the namespace. What is the difference between and the COM UIA Api? This is a complex subject with many scenarios and many solutions. I have asynchronous or background processes running in my app, how can I wait without using Thread.Sleep() Then if you handle the process exited event, you can check the error code and throw an exception to fail your test. How can I do this?įirst off, you need to disable Windows Error Reporting, view this GIST for details When the process I am testing crashes, I expect White to fail. If you are windows 7 and facing some issues automating menus NET based you can leverage the power of Custom Commands to drive automation. There is another route to automation if you intend to run a plugin inside the application. ribbon controls are supported by UIAutomation). The UIAutomation support is best on Windows 7, so you should use that when checking with UISpy. This can be checked easily by using UISpy. So the strength of automation support provided by white is equal to UIAutomation. White is based on UIAutomation for finding controls in a window. White support for office or any windows application. See ControlTypeToUIItemMapping for list of primary UIItems. Do I need to first get hold of the containing control first and then get the button from it? Button) is embedded inside a panel/group box. All in principle it is not a good idea to couple test code with application under test code as they would evolve independent from each other. White is not designed to work in this mode as this can cause threading issues. White currently doesn't handle custom wait cursors, this would be implemented in coming releases.Ĭan white test run in the same process as the application? This should be done in the application not for automation but the user in first place. If wait feedback is provided right in the application under test then white would handle it as well. This is true in the initial stages of the project, where wait notification to use is done as an after thought. There are a lot of applications which are built without using wait cursor (hour glass) to provide user feedback when the application is busy. Please read the Wait Handling to understand how white works. I have to put sleeps and wait-for-conditions in my tests. Please have a look at the WPF Items section on UI Items page.ġ. Since this is not a standard control structure how do I automate this best with white. I am using WPF and I have nested controls inside my control. In such cases generally the mechanism of indexing is preferable as that is how the user relates to them. I have multiple UIItems of the same type which has same id and text. Warning: while doing this at the desktop level please make sure you do not have too many un-necessary windows open as it might take a long time to log everything. Desktop, Window and PrimaryUIItem) to find out the descendant automation elements. Please perform LogStructure() on the parent UIItem (i.e. I am unable to find window, primary UIItem or secondary UIItem, what might be wrong? In order to change this you would need to edit the app.config file for the test. Try changing the ApartmentState to STA and see if that helps. Please search for "UIAutomation menustrip" in google for more on this. There is a known issue with UIAutomation and ToolStrip/MenuStrip support. If you running NUnitConsole without /nothread option then you should try that out. I am not able to find any items inside ToolStrip and MenuStrip (or DataGrid) The Silverlight support definitely needs work (and tests), but is not a priority at the moment. White Supports Silverlight, but currently there are no tests confirming it's stability. Silverlight is more like rich client why should white not support it? Look at Selenium, Sahi, Watir, Watin and Watij for testing web applications. Would there be support for Web Application testing?īecause there are already a lot of good tools which do this, developing it is not under consideration at this point of time.
0 Comments
Leave a Reply. |