Test complete Infragistics UltraWinToolbars
I'm not able to get the basic methods and properties of Infragistics UltraWinToolbars by test complete, even though Infragistics extension is available.
Can i know how basic methods and properties can be accessed
Re: Test complete Infragistics UltraWinToolbars
I have replied to you via e-mail. Here is a copy of my answer:
[ QUOTE ]
Thank you for your interest in our products, we appreciate it.
TestComplete has built-in support for the Infragistics main menu. However, the tool does not have such support for Infragistics toolbars since they are not standard controls. Nevertheless, since all .NET applications are recognized by the tool as Open, TestComplete can access native methods and properties of all objects in such applications. This allows working with any controls, including the UltraWinToolbars controls, by using these methods and properties.
The following script demonstrates how it is possible to click buttons of an UltraWinToolbar toolbar. The script works with the Basic Features sample application shipped with the controls.
<font class="small">Code:</font><hr /><pre>
var p = Sys.Process("BasicFeatures");
var w = p.WinFormsObject("Form1");
var tbManager = w.WinFormsObject("_Form1_Toolbars_Dock_Area_Top"). ToolbarsManager;
ClickToolButton(tbManager, "Editors", "Copy")
ClickToolButton(tbManager, "BigToolbar", "bt2")
ClickToolButton(tbManager, "Alignment", "Center")
function ClickToolButton(toolbarsManager, toolBarKey, buttonKey)
var toolbar = toolbarsManager.Toolbars.GetItem_2(toolBarKey);
var button = toolbar.Tools.GetItem_2(buttonKey);
var x = button.Bounds.X + button.Bounds.Width / 2;
var y = button.Bounds.Y + button.Bounds.Height / 2;
Sys.Desktop.MouseDown(VK_LBUTTON, x, y);
Sys.Desktop.MouseUp(VK_LBUTTON, x, y);
Log.Event("The '" + buttonKey + "' button from the '" + toolBarKey + "' toolbar is clicked");
[/ QUOTE ]