ContributionsMost RecentMost LikesSolutionsWPF app with AutomationId. Hi, Im in need of some help, and i hope you wonderfull people can help me out here. Im trying to use AutomationId in my test scripts, but can't get it working at all. Unless I still use the full path to the objects. I've been looking through the documentation and the board, but what I have found, did not help me any further - So i hope one of you, can help get me started :) Im writing the scripts in jscripting . I have an application where a search button has these properties: Sys.Process("Blabla1").UIAObject("Blabla2").UIAObject("MainControl").UIAObject("DashBoardView").UIAObject("MainTabControl").UIAObject("Dashboard").UIAObject("CompSearch").UIAObject("Search"); with automationId = SearchButton If i want to click that button, using automationID, how do I write my script? I really hope, someone can help me :) SolvedRe: Waiting for a window to close functionality. Jscript or keyword test. Hi, Thanks for the feedback. The suggestion works fine, when the application has a lot of data to process and it takes some time to close the window. The problem ocurs when there’s little data to process for the application and it closes the window immediately. Then a ”Object not found exception” is thrown. I had to implement it like this: function WaitWindowClose() { milisec = 0; //For some reason this only works for me, when I use a NameMappingItem in an if statement, combined with Exists. //Otherwise I get the object not found exception. if("NameMappingItem".Exists) { do { //You can't use the FindChild with 'NameMappingItem' - you have to use the 'Aliases' w.Sys.Process("ProcessName").FindChild("MappedName","<Insert mapped name using 'Aliases'>",1); milisec += 500; Delay(500); }while(w.Exists && milisec < 45000); if(milisec >= 45000) { Log.Error("Waited 45 sec for the window to close.. Stopping test"); } } else { } Log.Message("The window has successfully closed."); } Thanks for pointing me towards a solution :) Waiting for a window to close functionality. Jscript or keyword test. Hi, I'm fairly new to testcomplete and in need of some help creating a jscript/keyword test, either will work. Test scenario is: I click a createprofile btn that opens up a new window. I add some values to a textfield in the newly opened window and click a create profile btn. The system then processes the data, and closes the createprofile window when done - This can take up to 45 seconds. When done processing the data and the profile is created, it returns to the original window. The functionality i need in testcomplete is following: when the create profile btn is pressed in the new window, i need to wait untill the window is closed, for a maximum of 45 seconds. If the create profile window does not exist(closed) i want to proceed with the test. I've been trying to use: while("create profile window".Exists) { Delay(500); } The problem is then, when the window closes, the while loop then throws "Object not fund exception" after waiting the default timeoutvalue. Anyone has an idea on how to do this? Best regards Henrik Solved