Contributions
Array.splice() does not work
Hi everyone, I got a new problem with TestComplete and JavaScript. I want to remove an element in an array at index X and tried to use the splice method as it does exactly what I want to do. My code looks something like this: function someFunction() { var myArray = page.EvaluateXPath(...); for (var i = 0; i < myArray.length; i++) { // do something... myArray.splice(i, 1); // remove element at index i if it matches criteria break; } } now during debugging/testing if everything works fine, TestComplete tells me that "myArray.splice is not a function" and stops the test. Well... why does it not work? Obviously it is a function. the splice function is mentioned here too (I know it's from 2016). Can anyone help me with this? Or are there other methods since 2016? Cheers, KevinSolved4KViews0likes1CommentRe: Date.toLocaleString not working
FYI: last friday I got a reply from the TestComplete Support. it is mentioned in the documentation, that the Internationalization API is not supported in javascript here: https://support.smartbear.com/testcomplete/docs/scripting/specifics/javascript.html#Unsupported and as the Support suggested, I opened a feature request to implement this functionality here: https://community.smartbear.com/t5/TestComplete-Feature-Requests/Internationalization-API-Support/idi-p/203134#M2253 cheers.3.6KViews1like0CommentsInternationalization API Support
I want to submit the support for the Internationalization API as I tried to use it myself here: https://community.smartbear.com/t5/TestComplete-General-Discussions/Date-toLocaleString-not-working/td-p/202534 and in 2018 the user Muts here: https://community.smartbear.com/t5/TestComplete-Functional-Web/Javascript-toLocaleString/m-p/158445#M31749 in the documentation it is mentioned that it is not supported here: https://support.smartbear.com/testcomplete/docs/scripting/specifics/javascript.html#Unsupported I am sure that TestComplete is not only used in english speaking languages, so it would be nice to write Tests that are time critical or have a heavy use of time stamps and do some math with times in the local time and date format. It would be nice and I hope, some more users need want this too. š have a nice day all.559Views1like0CommentsDate.toLocaleString not working
Hello there, I have a question regarding the Date object in JavaScript. I want to use the following: function myFunction() { ... var myDate = new Date(year, month-1, day); var options = { year: 'numeric', month: '2-digit', day: '2-digit' }; Log.Message("myDate...", "myDate is: " + myDate.toLocaleString('de-DE', options)); // expected: 02.06.2020 // result: Mon Jun 02 2020 00:00:00 GMT+0200 (MitteleuropƤische Sommerzeit) } as you can see in my test log message I get a different result. does TestComplete not support this method or am I using it wrong? the ECMAScript specification of the Date object is this: https://www.ecma-international.org/ecma-262/6.0/#sec-date-objects and TestComplete uses ECMAScript 6 for JavaScript, as it is stated here: https://support.smartbear.com/viewarticle/77297/ so I thought I can use this method of Date. any suggestions? help? thanks in advance, KevinSolved3.9KViews0likes4CommentsRe: NodeBitmaps: what are they for?
Got an answer from Support: Supportwrote: "These XML nodes are the small icons that you see in the KDT editor on the left side of the top-level object nodes. Not all KDT nodes have icons in this format. I believe that icons in this format are created only for top-level windows. I do not think that there is any way to disable them. At least not in the GUI." so these are just the small icons for chrome or firefox browser and not something that can break my test. so I can ignore them from now on. but I have to say: the solution to store these icons in the XML file is a bit ... weird. with this huge encrypted (?) data segment. this could be implemented in a better way just like something like this: <Nodebitmaps> <Bitmap Name="Aliases.Browser" Data="chrome_icon"> </NodeBitmaps> but this is just my opinion. wish you all the best and thanks for contributing. Kevin2.4KViews2likes0CommentsNodeBitmaps: what are they for?
hello, I have a question regarding the NodeBitmaps node within the keyword test files. what is the purpose of those? and is there a way to stop testcomplete to change the keyword Tests when they are not touched by me in any way? see appended screenshot. reason is that it annoys me when I want to commit my changes into git and ƶinstead of one or two files that have changes there are many more because of the NodeBitmaps. I think it has something to do with the screenshots testcomplete takes during testing, but I can not find anything about it in the forums, Support or documentation. and I don't upload any image due to an entry in my .gitignore file. because we don't need them. I hope someone can help me on this topic. KevinSolved2.5KViews0likes5Comments