Contributions
Re: Sporadic problems with .NET WinForms object recognition in TC10.30
Thanks for responding, Tanya. And we knew we would be asked this. We have a 10.40 upgrade planned for later this year. We would only be moving this up if 10.40 has a specific fix for the issue in question. So my counter question would be: were there any changes in 10.40 that specifically improve object detection for our issue above? We saw an item in the release notes regarding general bug fixes, but nothing specifically addressed our issue. Jeff1.2KViews0likes0CommentsSporadic problems with .NET WinForms object recognition in TC10.30
Hello, We are experiencing a sporadic problem with .NET object recognition with a WinForms object. Most of the time, our .NET applications and child objects are being recognized correctly. But occasionally we get an unrecognized main form, which causes sets of tests to fail, and the errors flag our pipeline builds as bad. We’d like to eliminate the errors. The form that is not being recognized successfully is a WindowsForms10 object (WinFormsObject when properly recognized). I have attached a screenshot showing the names of the first two levels of child objects of the Sys.Process(“<OurAppName>”) object when the form is not recognized. Searching the forums, I’ve seen some older posts that seem to be related to this topic, and so I’ve collected the following information to help with figuring out what might be our problem. .NET Open Application Support Plug-in – This plug-in is installed and enabled. Method Invoke Timeout - From previous posts, we’ve seen that increasing the Method Invoke Timeout can help. We have increased this property to 30000 milliseconds. We have still experienced the recognition problem since making this change. (This change was made in the properties for the specific TestComplete project we are running, not in the Default project properties.) Version - We are using TestExecute/TestComplete v10.30.1145.7 x86 vs. x64 - Our application is compiled as an x86 application. Launch – The application is being launched via the TestApps collection. It is being launched in Simple Run Mode, and the application is being started after TestComplete/TestExecute has started processing the test. The application itself is started from a folder located off the Program Files (x86) folder. No specific custom Runtime Security policy settings are applied to where it is being run from. Open Application Status – Most of the time, the application is detected as an open application and our tests run correctly. So the application is being treated as Open most of the time. .NET versions – our application is targeting .NET v4.0. We’ve seen the issue on a couple of VM’s with different operating systems and installed .NET versions. One was a Windows 2008R2 system with .NET 4.5.1 installed, and another was Windows 2012R2 with .NET 4.5.2 installed. It should be noted that other runs on these same configurations worked fine, and this is a sporadic issue. No Prior TC/TE Abnormal Terminations – as far as we can tell, TestExecute is starting and stopping normally during these automation runs. Non-standard controls – The application is usually recognized as a WinForms application, and we are using DevExpress controls (XtraGrid, XtraVerticalGrid) in the application. AppDomain objects in process – When the application form is not recognized as a WinFormsObject, there is an Sys.Process(“<process name>”).AppDomain(“<app name.exe>”) object present in the object tree. See attached screenshot for how it looks when we log it to the TestLog. Any assistance would be appreciated. Thanks.1.8KViews0likes3CommentsRe: All Browsers have the same "BrowserIndex" = 1
From the help for BrowserIndex: The BrowserIndex property specifies the browser index among other running browsers with the same name. For example, if you have two different Firefox versions installed and both of them are currently running, the first launched Firefox process has BrowserIndex of 1 and the other one has BrowserIndex of 2. Similarly, if 32-bit and 64-bit versions of Internet Explorer are running at the same time on 64-bit Windows, one browser instance has BrowserIndex of 1 and the other one has BrowserIndex of 2. You have three separate browsers (IE, FF, Chrome), and each will have a BrowserIndex of 1 since there is only one instance for each type. Are you looking for the Browsers.Item() property to get the specific browser? Constant Value Description btIExplorer -1 Microsoft Internet Explorer. btFirefox -2 Mozilla Firefox. btChrome -3 Google Chrome. btOpera -4 Opera by Opera Software. btSafari -5 Apple Safari.1.7KViews1like0CommentsAutomatic WERFault Handling and Error Logging
We have an issue where, after making a change to one of our applications-under-test, the application is crashing on shutdown. We understand the nature of the crash, but it is due to a third-party component, and the time frame for correcting the issue will likely take a while. This manifests in our TestComplete runs as an error entry in the logs: Message: The <processname.exe> process crashed. Additional info: Exception code: 0xC0000005. Process identifier (PID): xxxxx. Dump file: <file_name>.dmp. The inclusion of this entry is completely out of our control, as it is generated by TestComplete directly. The Windows Error Reporting Fault Dialog is also apparently automatically handled by TestComplete as well. Normally, this would be fine. But as this issue is known to us, and the fix for the crash is out of our control, we simply want to downgrade the error to a warning, and perhaps trap the error directly since we know the component associated with the known crash, and could search the WERFault details for this additional information. Any errors detected in our TestComplete logs are used to fail builds, so not having control over this logging is going to be problematic for our build pipeline. Is there any way we can control this behavior, either to allow us to control the crash handling directly, or to change the way in which TestComplete is reporting the process crash and convert the log priority to a warning? If there isn’t, please add an entry in your issue tracking database to indicate that a user would like this level of control. Any information is appreciated! JeffSolved6.6KViews0likes3Comments