ContributionsMost RecentMost LikesSolutionsSimplified WPF object tree: Filter additional object types Hello, I'm testing a WPF application, and when I enable the Simplified WPF object tree there are still several object types that I'd like to filter out, such as "AdornerDecorator". Is there any way to add items to filter out? Yeah, I know I could just NameMap them and skip them in the Alias, but it would be nice... Thanks, Howie Re: Access to Winforms dialog titlebar buttons This is exactly what I was looking for. It allows me to map the button and read it's properties as needed. Thank you. For anyone else who's interested, I found more information about this method in article 74648: Project Properties - MSAA Options Access to Winforms dialog titlebar buttons Hi, I'm having difficulty programmatically identifying the red-x button at the top of a winforms dialog. I'm talking about the one in the top-right corner, normally seen next to the minimize and maximize buttons. Is anyone familiar with how to specify this button? I've been digging through the properties but I seem to be going around in circles. Any suggestions would be appreciated. Thanks, Howie SolvedRe: Compare two foldersIt seems I've wandered in an old thread, but just in case someone (else) finds themselves here and wants to be able to compare folders recusively, I've cooked up the following. Note that I included an "isValid" function; you can refactor it back in, but it seemed inconvenient to test both "null" and "empty variant" over and over manually. I've tested this against the following cases: - One argument is invalid - One argument is a file, not a folder - Folders are identical with no subfolders - Folders are identical with subfolders containing files - Folders are different; subfolder has extra file - Folders are different; folder content matches but file content is different Hopefully that covers our bases... function CompareFolders(left, right) { //ensure arguments are not null if(!isValid(left) || !isValid(right)) { return false; } //verify arguments are valid folder paths if(!aqFileSystem.CheckAttributes(left, 16)) { return false; } if(!aqFileSystem.CheckAttributes(right, 16)) { return false; } //get subfolders and files var leftSub = aqFileSystem.GetFolderInfo(left).SubFolders; var leftFiles = aqFileSystem.GetFolderInfo(left).Files; var rightSub = aqFileSystem.GetFolderInfo(right).SubFolders; var rightFiles = aqFileSystem.GetFolderInfo(right).Files; //verify file and subfolder presence if(isValid(leftSub) != isValid(rightSub)) { return false; } if(isValid(leftSub)) { //verify subfolder count if(leftSub.Count != rightSub.Count) { return false;} for(var i = 0; i < leftSub.Count; i++) { //verify subfolder name and content if(leftSub.Item(i).Name != rightSub.Item(i).Name) { return false; } if(!CompareFolders(leftSub.Item(i).Path, rightSub.Item(i).Path)) { return false; } } } if(isValid(leftFiles)) { //verify file count if(leftFiles.Count != rightFiles.Count) { return false; } for(var i = 0; i < leftFiles.Count; i++) { var leftItem = leftFiles.Item(i); var rightItem = rightFiles.Item(i); //verify file name and content if(leftItem.ShortName != rightItem.ShortName) { return false; } if(!aqFile.Compare(leftItem.Path, rightItem.Path)) { return false; } } } return true; } function isValid(obj) { if(obj == null) { return false; } if(obj == aqObject.EmptyVariant) { return false; } return true; } Re: Deploying script extensions to TestExecuteGod damn it. 1. Launch TE 2. Right-click icon on system tray > "Options" 3. Click Engines> Script Extensions 4. Add path to folder Deploying script extensions to TestExecuteHi, Can anyone explain how you deploy script extensions to TestExecute? I've got a very large volume of test that rely on custom objects that I've created through script extensions and I can't find an explaination of how to make them available to TestExecute. ThanksRe: Displaying Script Extension method parameter/return types in the Code Completion window Hey Phil, thanks for getting back to me. I was afraid of that. Any idea how I go about requesting a feature for 10.4? In the meantime, I've come up with the following, which gets me by: <Method Name="Method1" Routine="Method1"> Parameters: int, int Returns: bool Description: Method1 description </Method> but ohhhh! if I could do this: <Method Name="Method1" Routine="Method1" ReturnType="bool"> <Parameter Name="input1" Type="int" /> <Parameter Name="input2" Type="int" /> <Description>Method1 description</Description> </Method> Re: "Object does not exist" problemsHey Vlad, I've faced a similar problem with one of my applications, due mostly to the need to support legacy Janus controls. What I ended up doing was mapping the menu items as children of the menu bar, then calling a helper function to discover them in the future. I don't know if it will help you, but here are my steps: 1. Identify the top-most menu 2. Use MenuCrawler() to print the children to the Log 3. Use the log to create a reverse-lookup 4. Use the reverse lookup to create a click method This method is chalk full of potential pitfalls, but for my particular situation this method was a good jumping off point. Good luck out there. - Howie function MenuCrawler() { //put in the name of the top-most menu GetSubMenu(Aliases.<Product>.Form.UICtrlsMainMenu, "["); } //this method recursively searches for child menu items function GetSubMenu(menu, prefix) { if(menu == null) { return; } var count = menu.Count; if(count == null || count <= 0){ return; } for(var i = 0; i < count; i++) { Log.Message(prefix + i + "] :: " + menu.Items(i).Caption); //this might need to be ".Text" or ".Content" depending on the circumstances GetSubMenu(menu.Items(i).SubMenu, prefix + i + "|"); } } /* Some sample log output: [0] :: File [0|0] :: New [0|1] :: Save [0|2] :: Quit [1] :: Help [1|0] :: Contact [1|1] :: About */ //new lookup method: //this method returns the whole control, in case you need ".Enabled" or ".Visible" and whatnot function FindMenuItem(path) { var menu = Aliases.<Product>.Form.UICtrlsMainMenu; switch (path) { case "File" : return menu.Items(0); case "File|New" : return menu.Items(0).SubMenu.Items(0); case "File|Save" : return menu.Items(0).SubMenu.Items(1); case "File|Quit" : return menu.Items(0).SubMenu.Items(2); case "Help" : return menu.Items(1); case "Help|Contact" : return menu.Items(1).SubMenu.Items(0); case "Help|About" : return menu.Items(1).SubMenu.Items(1); default: return null; } } //this method specifically clicks on the button in question function ClickMenuItem(path) { FindMenuItem(path).Click(); } Displaying Script Extension method parameter/return types in the Code Completion window Hey Everyone, I'm trying to get the Code Completion window to display my method parameters and return types. Here's what I'm getting now: XML: <RuntimeObject Name="TestObject"> <Method Name="Method1" Routine="Method1">Method1 description here</Method> </RuntimeObject> JScript: function Method1(input1, input2) { return true; } Code Completion: Object Method1(Object input1, Object input2); Method1 description here Here's what I'm trying to accomplish: Code Completion: Boolean Method1(String input1, String input2); Method1 description here I can't seem to find the correct combination of XML/JScript to get this to work. All the objects that are built into TC have this additional information, surely there must be a way for me to add these details, right? Any help would be greatly appreciated. Thanks, Howie Here are some things I've tried: Boolean Method1(input1, input2) //trying to get return value Boolean function Method1(...) function Boolean Method1(...) bool Method1(...) bool function Method1(...) function bool Method1(...) boolean Method1(...) boolean function Method1(...) function boolean Method1(...) function Method1(input1: string, input2: string) function Method1(input1 : string, input : string) function Method1(input1 : String, input2 : String) function Method1(String: input1, String: input2) Re: Using an INI file stored in the project suiteOut of curiosity, are either the machine names or user names unique? If they are you might be able to create individual ini files for each scenario, and then use Sys.HostName or Sys.UserName (possibly in combination with Sys.DomainName) in order to identify the correct file... switch(Sys.HostName) { case "EN_Win7x32": iniName = "english.ini"; break; case "FR_Win7x64": iniName = "french.ini"; break; } var path = <relative path to directory embedded within your project> + "\\" + iniName; or, hypothetically, if you named the ini files to match the machine names you could just do this: var path = <relative path> + "\\" + Sys.HostName + ".ini";