ContributionsMost RecentMost LikesSolutionsRe: Errorhandling in JScript KDTOperation Thanks I will try to modify my code in the suggested way and let that run for some days. Let's hope that that reduces falsely failed tests. Re: Errorhandling in JScript KDTOperation This seems to get of the path from my question but I'll try to explain. The test suite is run embedded into our build system. Each test case tries to close the application at the end, but that sometimes fails. Thus the next test case has to make sure, that the application is closed before running. Sometimes it happens, that the application is still in the process of closing when the next test case is started. In this case WaitProcess() returns true but Terminate() fails if the final closing of the process falls in-between the two function calls. This doesn't happen too often but every few times the test suite is run. Thus, the test suite fails randomly, depending on whether the server manages to close the application fast enough or not. I could include delay operations at the end of each test but this would significantly increase the overall time to run the test suite. There is already enough waiting for things to happen. But if this is the workaround for not being able to catch an exception then so be it 😞 Re: Errorhandling in JScript KDTOperation Thanks for your answer. I have simplified the code a lot. The productive code includes WaitProcess(). But during test execution it happens randomly, that the process is terminated between WaitProcess() and Terminate(). I just want to log a warning in this case and continue with the execution of the test case. Is it not possible to call a script function and ignore any errors it throws? Errorhandling in JScript KDTOperation I have a customKDTOperation written in JScript installed as script extension. The operation is called at the start of my keyword test. The aim of the operation is to terminate a running process of the tested application. The simplified code looks as follows: function KillProcess() { try { Sys.Process('my application.exe').Terminate(); } catch (e) { Log.Warning(e.message); } } This works fine if the process is running but the test fails when the process is not running: the catch-block is never called even though an exception is thrown in the try part. What am I doing wrong? How can I handle an exception in my own KDTOperations? Re: Using Unicode with Recorder.AddSyntaxToScript No, unfortunately the encoding of the script files does not change the behaviour. It is set to UTF-8. As I've already stated,AddTextToScript works fine and AddSyntaxToScript in the same script function does not. Re: Using Unicode with Recorder.AddSyntaxToScript No, the given example does not work as expected. It displays a message box containing "\u2030Šš\u203a\u2039žŽŸŒœ\u2022€" and not my string passed from the JavaScript code. Thus the string is not interpreted correctly. Also the string ist not correctly displayed inside the keyword test editor. If I add operations using `AddTextToScript`, any unicode characters are displayed correctly inside the keyword test editor and also during execution of the test. Using Unicode with Recorder.AddSyntaxToScript I have written my own record action (as script extension) to handle certain cases during test recording. The implementation of the record action uses `Recorder.AddSyntaxToScript` to add operations to the test being recorded. Unfortunately I noticed that this function is unable to handle Unicode correctly. Example (very much simplified): function RecordExecute_CurrentControl_JS() { var call; call = Syntax.CreateInvoke(); call.ClassValue = 'BuiltIn'; call.InvokeName = 'MessageDlg'; call.IsProperty = false; call.AddParameter('‰Šš›‹žŽŸŒœ•€'); Recorder.AddSyntaxToScript(call); } This will end up in my keyword test as follows: BuildIn | MessageDlg | "\\u2030Šš\\u203a\\u2039žŽŸŒœ\\u2022€" Is there any method I need to call on my string parameter to prepare it for `AddSyntaxToScript`? P.S.:Recorder.AddTextToScript works just fine with any Unicode-String passed. Re: Javascript: how to create a variant array of strings Okay, I can answer my own questions. Actually the solution is given in the documentation forCreateVariantArray: function ConvertArray(Array) { // Uses the Dictionary object to convert an array var objDict = getActiveXObject("Scripting.Dictionary"); objDict.RemoveAll(); for (i in Array) objDict.Add(i, Array[i]); return objDict.Items(); } function CreateVarArray() { var jsArray = []; jsArray[0] = "value 1"; jsArray[1] = "value 2"; varArray = ConvertArray(jsArray); } Javascript: how to create a variant array of strings From my TC project I want to pass an array of strings to my Delphi application from a JavaScript unit. If I have understood the matter, I need to pass this array as variant. To create the variant array I try to use theCreateVariantArray function using the following code: var varArray = BuiltIn.CreateVariantArray(0,1); varArray[0] = "value 1"; varArray[1] = "value 2"; Unfortunately this only creates the array but the elements remain empty: debugging inside TC shows the Locals panel with the array but it has two empty entries and inside the receiving function in my Delphi application the array also has two elements which are both empty. Searching this board and the internet did not reveal any hints. Many thanks in advance for any help. SolvedRe: Implement Parameterized function for TestedApp, in Keyword Driven Testing I'm currently facing the same problem: I want to pass test-specific parameters to the tested app (more precisely: parameters to pass for all tests defined on the tested app and additional parameters for some tests). Using either Call Object Method orRunCode Snippet operations is not suitable as both modify my tested app and thus modify the project. This may lead to subtle errors on test execution as the default state of the tested app is notconstant. Did I oversee a solution to pass parameters without modifying the tested app itself? P.S. the video link does not work any more.