Contributions
Re: TestComplete QuerySelectorAll do not return Array (TC 14.80)
Hello Justin Kim, To answer to your question, indead I can not call any DOM Attributes, because rowsTC[i] and rowsNative[i] in loop returns undefined. I tried to use FindElements. The result is better and as expected. Netherless, it seems FindElements() is not available on retrieve DOM element next to querySelector(). Thanks a lot for the Workaround. I Hope I will be to solve/understand what is happen. Kindly Regards, Nicolas.905Views2likes0CommentsTestComplete QuerySelectorAll do not return Array (TC 14.80)
Hello all, I'm trying to works with querySelectorAll, but TestComplete only returns me the length of the result, not the Array. I tried with TC version QuerySelectorAll and native one querySelectorAll and I have the same result : 1. First I select the object using NameMapping (via Aliases) : It returns me the expected object : 2. From the object, I get a HTML table (querySelector works as Expected) 3. For querySelector / QuerySelector on my retrieved table. I get ONLY the length which is prooving it must be able to retrieve my rows : Reading rows : Conclusion : From "rows", i'm not able to handled returned rows. According to the Documentation (for appropriate Version) I have to get an Array : The example available here confirm that I have to get an Array : (https://support.smartbear.com/testcomplete/docs/ver-14-80/app-testing/web/general/common-tasks/finding-objects/css-selectors.html) How I suppose to handle my result ? Thanks a lot for any help. Kindly Regards, Nicolas D.Solved925Views0likes2CommentsRe: Which JavaScript engine is used for TC ?
Hello Mueller597, Thanks you for your reply. I found what was wrong. I have a statement which testing my argument is an Array. For TestComplete, my provided array is not considered as an instance of Array. if (argv instanceof Array) { argv.forEach(function ($value) { Log.message("argv = Array // " + $value); if (data.lastIndexOf($value) < 0) { if (this.callbacks && this.callbacks.add && this.callbacks.add.push) { $value = this.callbacks.add.push.call(this, $value); } Log.message("Not found -> push"); data.push($value); } }.bind(this)); } My arguments passed like this, in strict sense, it's not an instance of Array (!= new Array()) const tablejs = require('tablejs'); function run() { let table = new tablejs( ['FIELD'], [], [ // << ['A'], // << ['B'] // << ] // << ); let ndu; } I was able to fix the issue ! Kindly Regards, Nicolas D.866Views2likes0CommentsWhich JavaScript engine is used for TC ?
Hello All I would like to know more about JavaScript engine used in TC. I developed a Library in ES6 which works perfectly in NodeJs & Webapps on browser. In TC, the script is executed without error, but the result is not as expected. In one moment, In callstack, TC does not seen any local variable. I expected an Array with rows, but in TC, it returns an empty arrows. In the current screenshot, execution goes in the method add(), but nothing done. I would like to understand why TC is not able to run correctly a basic JS Scripts which works anywhere? Kindly Regards, Nicolas D.Solved928Views0likes1Comment