ContributionsMost RecentMost LikesSolutionsRe: TestComplete issues with Chrome 113 Hellow,PMularczyk I have a question here on this. We did not install any new version of TestComplete or the corresponding extension this morning. We DID see a minor change in version number for Chrome 113 (it's still Chrome 113 but changed from .92 to .93). And now, suddenly, our automations are working again. I'm VERY suspicious of magical fixes like this. Was it the chrome change that corrected things? Or are we still expecting code changes to come in TestComplete/TestExecute and the associated extensions? Re: Find function or method in KeyWord tests There are any number of text tools out there... they are just text files, formatted in an XML structure. So, open the file in a text tool and search. WARNING: DO NOT MAKE ANY CHANGES WITHIN THE TEXT TOOL. The structure is specific to TestComplete and I don't think it's recommended to make any such changes directly. Re: Find function or method in KeyWord tests Keep in mind that Keyword tests, on screen, are a graphical representation of a complex XML formatted file. So, while it may seem simple to search for what's on screen, it's not quite that simple in truth. I know of other tools that do so, though, so it's possible. But be aware that it might take a bit to add that feature. If you want, you can request the feature athttps://community.smartbear.com/t5/TestComplete-Feature-Requests/idb-p/TestXCompleteFeatureRequestsand then other folks in the community can vote it up to be included in future development of the tool. Re: A const value does not work in other files I think it has to do with the value being only locally scoped to the unit. While within the unit where the constant is declared it's treated as a constant, as soon as you pull that unit into a new unit, it becomes a variable. Example: //USEUNIT Constant function bar(){ Log.Message(Constant.TEST_CONST) Constant.TEST_CONST = 'yada' Log.Message(Constant.TEST_CONST) } In the above example, the first message call returns blank, no matter what I have it set to in the unit "Constant". But then if I assign it the word "yada", then it returns "yada". What it looks like is that a constant in a JavaScript unit is just a property of that unit that has no "set" method associated to it. When you export the unit using modules.export (or //USEUNIT) you're not using the unit as is, you're exporting the unit as an in memory instance of the unit object which is set up to be more generic. What I've found, generally, is that while JavaScript in TestComplete works pretty closely to using JavaScript in an actual web application, there are some differences that require work arounds.My best bet for you, for simplicity sake, is make sure you're consistent in your naming convention for constants (variables = camelCase, constants = ALL_UPPER) and then just remaining consistent in how you use those items. In that case, the "exports" and "require" methodology will work best for you. Re: A const value does not work in other files Yes. Scope. The constant is declared in one file but that doesn't necessarily mean it's scoped to be able to be used in another file. I'm assuming you're using JavaScript. In order to use something declared in one unit in another unit, you need to export the item or use the //USEUNIT call. Seehttps://support.smartbear.com/testcomplete/docs/scripting/calling-routines/declared-in-another-unit/javascript.html Here's how I'd change your code First unit where the constant is declared const MAX_SEARCH_DEPTH = 20 module.exports.maxSearchDepth = MAX_SEARCH_DEPTH In the calling unit: var constantUnit = requires("constantUnit") function test (){ Log.Message(constantUnit.maxSearchDepth) } Re: Inconsistent test duration I'm assuming this is a web application? Basically, you nailed it with object recognition. When TestComplete needs to find an object and click on it, sometimes the object may not be available right away so it delays. I'm assuming there are no errors in your project which means TestComplete eventually finds the object but it's that "find" time that sucks up your run time. Something to take a look at is whether or not you have "extended find" turned on in some of your mapped objects. IF an object is not found right away, sometimes "extended find" can trigger longer runs as this triggers a scan of the full object tree. My suggestion: 1) Rework your test to include some better "wait" code to wait for components to load before you proceed with the test. While this may slow your "fast" runs down a little bit, it WILL make your code more consistent in timing by building in checks. If you think about it, as a human, you respond to small triggers and stimuli as you're working with an application that indicate that it's "ready" for you to interact. You should code automations likewise 2) Rework your name mapping to remove extended find where it's not necessary or useful. It has it's purpose in some web applications with a lot of <DIV> elements but it can slow things down. Re: How to map object from screen unselectable You can also use the Object Browser to find the table in question, right click, and select to map the object. Re: TestComplete: Unable to see c# option while creating project. Is it actually fully supported? A couple of specific things here: 1) Chat GPT, while AI, is really not a reliable source of complete information. It is "Trained" based upon web content and will only regurgitate a synthesized version of what can typically be found on the web. The key item missing in that Chat GPT result is the word "syntax". You can write C# syntaxed scripts but it is NOT C# .NET programming language complete with all the built in objects, etc. 2) Asrraghvani pointed out, the only reason to use the C# Syntax C#Script is if you're going to be doing connected applications and such. The language used for the automation does NOT have to be the same language that the application under test is written in. I can write a DelphiScript automation to test a Java application or a JavaScript automation to test a Python application. Where the "right fit" for the tool is has to do with what language of automation code you're comfortable in. Because C# and JavaScript are close in syntax, it makes sense to use JavaScript in your application. If your management is firm on "it must be C#", we've provided the work around as indicated. However, you might want to communicate to your management that the automated test and the application under test do not need to share a language. Re: TestComplete: Unable to see c# option while creating project. Is it actually fully supported? No, it is not an object oriented application development environment. It IS a scripting environment AND you can use DotNet structures, objects, and classes within your automation world. Seehttps://support.smartbear.com/testcomplete/docs/testing-with/advanced/using-external-functions/calling-from-dotnet-assemblies.html#CLRBridge It is NOT C# Application development environment so you'll need to adapt your techniques to a scripting environment. Re: TestComplete: Unable to see c# option while creating project. Is it actually fully supported? Try this: 1) Right click on your Project Suite in the Project Explorer 2) Select Add -> New Item The resuting dialog is a little different and allows you to select C#Script as a scripting language. Note, however, that the documentation given above still applies. There is, technically, no such thing as C#Script. It's a wrapper around JavaScript in the TestComplete project structure.