ContributionsMost RecentMost LikesSolutionsRe: I updated my testcomplete from version 12 to 14 now it does not recognize the mapping of my screen I have seen this for years since version 9. If you search on these forums you will find simular observations going back years. I consider it a bug in TestComplete and have code to handle it. We don't use name mapping because of this. Here is what I have found that will minimize it. Make sure that you set the file compatibility property to 'Run this program as an administrator' for all users for both TestComplete.exe and TestExecute.exe In your Project\Properties\Open Applications\General move the NativeDelphiObject to the top of the list. Re: Edited cell turns to a different color, how to automate this? Old code never dies. I posted this on the forum years ago. For those that test objects that do not have the color properties there is a way to check an individual pixel of any object on the desktop. The code is VBscript. You can format the output to suit your needs. Function Return_RGB(objWindowType, nvXcoord, nvYcoord) '************************************************************************************************************************* '* FUNCTION: Return_RGB(objWindowType As Object, nvXcoord As Long, nvYcoord As Long) '* '* PURPOSE: To return a RGB set of values that is the color of the X, Y coordinate of the Window Object '* '* EXAMPLE: Return_RGB(Sys.Process("MyProcess").VCLObject("frmMain"), 10, 10) ' Normal Window object '* '* The example returns the RGB color of the pixel at the 10,10 coordinate of the VCLObject("frmMain"). '* The return value is a string that would look like >>> 255,26,0 '* The '255' is the Red value. 1st position '* The '26' is the Green value. 2nd position '* The '0' is the Blue value. 3rd position '* '************************************************************************************************************************* Dim tPOS, dcWindow, nvRGB, svTemp Dim lRed, lGreen, lBlue Set tPOS = POINTAPI Return_RGB = "NO COLOR FOUND" If objWindowType.Exists = True Then ' Move to the X, Y coordinate objWindowType.HoverMouse nvXcoord, nvYcoord ' Get the dc of a specific hwnd - the desktop dcWindow = Win32API.GetWindowDC(0) ' Get the cursor position relative to the screen. tPOS.y = objWindowType.ScreenTop + nvYcoord tPOS.x = objWindowType.ScreenLeft + nvXcoord ' Use GetPixel() with the appropriate DC and location nvRGB = Win32API.GetPixel(dcWindow, tPOS.x, tPOS.y) ' HEX to string svTemp = Right("000000" & Hex(nvRGB), 6) ' Parse out the individual values lRed = CLng("&H" & Right(svTemp, 2)) lGreen = CLng("&H" & Mid(svTemp, 3, 2)) lBlue = CLng("&H" & Left(svTemp, 2)) Return_RGB = CStr(lRed) & "," & CStr(lGreen) & "," & CStr(lBlue) 'Return the RGB values here Else Return_RGB = "NO COLOR FOUND" Log.Warning "Return_RGB - NO COLOR FOUND - Object did not exist - Window to check= " & objWindowType.Name, "", pmNormal, LogAttributes(0), Sys.Desktop End If End Function Re: Getting error text in message Do both of these entries in your project.... In project properties/open Application/UI Automation , added class DirectUIHWND In project properties/open Application/MSAA , added class DirectUIHWND I originally placed some of my code in the response, but after reviewing it I had to withdraw it because it calls other custom code making this response unusable to you. Basically I look -Using FindChildEx() - for a classname of 'Element' or 'Static' and the static class has an index of 2. My apologies. Re: More OCR questions? One thing you could try is to turn OFF Clear Type Text on the test machines. When Clear Type Text is set for your display device, it ‘smooths’ the pixels of the LCD monitor so the image looks better to the human eye, but it ‘skews’ the bitmap image on the screen and can interfere with the OCR function. It can also interfere with the TextObject identification. On your machine, go to the Control Panel\Display\Adjust Clear Type text to make the change. You cannot do this via remote desktop, you must be on the console. We do this as the standard setup on all our test machines. Re: More OCR questions? The application that we test uses the Tahoma font also. I do not have a definitive list of the best common values, but I can relate to you some methods I use in helping the OCR function to work faster. Our projects are in VB script. I use code that works with the individual window objects, not the entire form or the entire desktop. I have found that if you try to limit the area inside the window object that you are trying to read the text from, you will speed up the OCR process. Also, try to avoid horizontal and vertical lines as this will add time to the OCR process. Since we are working with images on windows objects I decided to create a class to hold not only the window object, but the position and dimensions inside that object that I want to do OCR on. (Top, Left, Height, Width) I also found out that you can use the Picture.Stretch method on the window object before you pass it to your OCR code. This allows you to work with fonts outside of the range of the OCR engine. You can stretch larger or ‘stretch’ smaller. It can also be used to resize the images to the font sizes that your tests show work the fastest. You mentioned that font 30 was the best in your trials. Now you can limit the number of font sizes that you load into the OCR engine. Hope this helps a little. Re: Error on Slave machine while running distributed testing We have an open issue with the SmartBear programming department on this. I spent 6 weeks sharing my master and slave machines with every level of support, all the way to the Programmers in Russia. The only work around we came up with was to keep 11.31 installed on all the machines. (Master and 3 slaves.) We put the previous version 11.30 of the file TestCompleteService11.exe into the \TestExecute\Bin folder on each slave machine. Started the service back up and then it worked. I am still wait for a response from the Support department. I see that they came our with version 12, but there is no mention of them fixing this issue in 12. We are going to hold off on upgrading to 12 until a response comes to us from this issue. Re: Object Spy locks on application crash? Don't you just hate it when c#.NET apps spawn Delphi modules? Since you already gather a lot of info about the crash, try terminating the application at a point after you get your info, but before it locks up TestComplete/TestExecute. Tell those programmers to fix it! Fix it! Fix it! Re: Dialog windows in Delphi XE 10 (Rad Studio XE 10) Our company uses the same framework for our applications. It is our policy to NOT compile the applications with debug information. So for the past 16 years I have been testing these applications with QARun, TestPartner, and now exclusively TestComplete. The issue of the popup window having two different class names was solved 16 years ago and I have converted the code to TestComplete. We use TestComplete version 11.20.1491.7. We do not use name mapping at all and rely on the various Find methods to access the objects. The function is called PopupsUniversal. You pass the process object, caption text, and the text of the button to the function. It returns True if the button was clicked. The example below should work for the information that you provided. Sorry about the indentions, when I copy and paste all tabs are lost. Sub One Dim p Set p = Sys.WaitProcess("download", 3000) If p.Exists = True Then If PopupsUniversal(p, "download", "OK") = True Then Log.Message "Clicked the popup." Else Log.Message "Did not click the popup." End If Else Log.Error "Process not found." End If End Sub Function PopupsUniversal(objProcess, svCaption, svButtonText) Dim f, objButton PopupsUniversal = False If Win32API.FindWindow("TMessageForm", svCaption) <> 0 Or Win32API.FindWindow("#32770", svCaption) <> 0 Then Set f = objProcess.FindEx(Array("WndClass", "WndCaption"), Array("TMessageForm", svCaption), 1, True, 500) If f.Exists = False Then Set f = objProcess.FindEx(Array("WndClass", "WndCaption"), Array("#32770", svCaption), 1, True, 500) End If If f.Exists = True Then f.Activate Set objButton = f.Find(Array("WndClass", "WndCaption", "Visible"), Array("Button", svButtonText, True), 10, True) If objButton.Exists = False Then Set objButton = f.Find(Array("WndClass", "ObjectIdentifier", "Visible"), Array("Button", svButtonText, True), 10, True) End If If objButton.Exists = False Then Set objButton = f.Find(Array("WndClass", "Caption", "Visible"), Array("Button", svButtonText, True), 10, True) End If If objButton.Exists = False Then Set objButton = f.Find(Array("WndClass", "WndCaption", "Visible"), Array("TButton", svButtonText, True), 10, True) End If If objButton.Exists = False Then Set objButton = f.Find(Array("WndClass", "ObjectIdentifier", "Visible"), Array("TButton", svButtonText, True), 10, True) End If If objButton.Exists = False Then Set objButton = f.Find(Array("WndClass", "Caption", "Visible"), Array("TButton", svButtonText, True), 10, True) End If If objButton.Exists = True Then objButton.HoverMouse objButton.Click PopupsUniversal = True End If End If End If End Function Re: sihost.exe process crashed? I'm going to stick my neck out here and say that I remember that we had this issue on one of our Windows 10 machines and we turned off the setting: Options\Engines\General\Windows Store Applications 'Enable support for testing Windows Store applications (requires restart). We unchecked it. This assumes that you are not testing Windows Store Applications. We also saw that calculator or some other Windows app would start when TestExecute started up when this setting was checked = on. If you have both TestComplete and TestExecute on the machine you willl have to make that entry in both applications. We are using TestComplete and TestExecute version 11.20.1491.7 Re: How to Retrieve Data from Web Page in Tabular Format in TestComplete using VB Script I can show you how to 'Split' the string. Each element in the string is actually delimited with the character Chr(10). The character Chr(10) is the New Line character. The contents of each cell is in the array 'a'. Sub Example Dim a, x, page, vTextObject, vQlikObject Set page = Sys.Browser("iexplore").Page("http://us-b.demo.qlik.com/QvAJAXZfc/opendoc.htm? document=qvdocs%2FItalian%20Schools%20Navigator.qvw&host=demo11&anonymous=true") Set vTextObject = page.WaitPanel("PageContainer", 3000).Panel("MainContainer").Panel(62) vQlikObject = vTextObject.contentText a = Split(vQlikObject, Chr(10), -1, 1) For Each x in a Log.Message "The text value is : " & x Next End Sub Hope this helps...