ContributionsMost RecentMost LikesSolutionsUnknown reason for errors in the logs while filling out the userform Hello, I'm using a user form to configure some tests and then run it. It works just fine, but I keep getting this error in the test logs. Could anyone please point to what seems to be wrong or what might be causing this error? Here's the snippet I have used for accepting the values in the cxUserName field. //Username validation function cxUserName_OnChange(Sender) { Project.Variables.LOGON_ID = Userform.cxUserName.Text; } Thank you Al2 SolvedRe: How to get a Database table into an object (2D Array may be), and read the data Actually, writing to the external file is something I ruled out in the beginning. The best thing would be to keep this data in an object and read thru it. Yes there are data security concerns, too. Here's the sample of results that I get using the method getRows() (R -Row and C- Column). Since this is in the linear form, it's not very helpful. var rslt = [R0C0 , R1C0 R2C0, R3C0, R0C1, R1C1, R2C1, R3C1, R0C2, R1C2, R2C2, R3C2 ]; I appreciate your time and help! Thank you Al2 Re: How to get a Database table into an object (2D Array may be), and read the data BenoitB Thanks much for help. I tried adjusting my code based on your suggestions. Getrows() is definitely the best way to get the data into the record set quickly. I wasn't aware of this method. I could get all the data into the array, and all the data here is in the form of a liner array. FunctionResult One thing that I struggled with was to convert this into 2D array and append the column names so that I can reference these values using the Array, Index and the column name. I had spent some time on it earlier when you provided these suggestions, but haven't had any tangible success. I tried to implement an idea similar to what you suggested in this piece, but haven't got that working. var FunctionResult = { data : [], count : 1, error : "" }; try { if (Donnees == null) throw Error("Le paramètre obligatoire Donnees n'est pas renseigné.") var fields; var temp; temp = qa.system.getTokenBySeparator(Donnees, FunctionResult.count, Separator); while (temp != "") { fields = temp.split(ValueSeparator) if (Normalize) { fields[0] = qa.system.trim(fields[0]); fields[0] = aqString.ToUpper(fields[0]); fields[1] = qa.system.trim(fields[1]); } FunctionResult.data[fields[0]] = fields[1]; FunctionResult.count++; temp = qa.system.getTokenBySeparator(Donnees, FunctionResult.count); }; Thank you! Al2 Re: How to get a Database table into an object (2D Array may be), and read the data BenoitB Thanks much for providing some insights into this. I see that you have a function as an array variable which has a JSON object 'functionResult'. That would store the 'data table' in 'data' array as a value. 'data' gets all the elements from 'temp' object which in turn contains row data separated by commas(,) ? I have a few questions. Are you using the StringToNamedArray anywhere else to fetch the data from the array object after table is loaded into 'data' ? What are these params : Donnes, Normalize referring to ? I'm not so clear about FunctionResult.Lines = Results.GetRows().toArray();Lines is not defined in JSON what's the getTokenBySeparator utility doing? I really appreciate your help and the direction you've given. I'm still trying to understand this piece. On the other hand, I have another function which has an ADO connection and runs a query. After that it makes a call to the routine: dbRecordToObject(record) This fetches single record at a time and that gets pushed to a set like this: but this is really slow var set = conn.Execute_(exeQuery); //declare an array var elementList = []; Log.Message("INFO: set.EOF is: " +set.EOF); if(set.EOF == false){ set.MoveFirst(); while(!set.EOF) { //get the result set into the array elementList.push(dbRecordToObject(set)); set.MoveNext(); } //Closing the connection conn.Close(); return elementList; Thank you Al2 How to get a Database table into an object (2D Array may be), and read the data Hello, I'm running a UI tests which fetches data continuously from a DB table. This table has 10000 rows and 20 columns. Test continuously fetches the data, and uses if for modifications, and many column values get updated. It goes thru three iterations, and in each iteration column values get changed. The problem I'm facing: The way I'm fetching these values in an object takes significant time(~ 2 hours) to get all these values into an object (10000 rows x 20 Columns = 200,00 cells) because each value is being fetched individually. What I really need help with is, a way to fetch the whole data table into an object (may be an array), and then be able to read each cell(row, column) value buy using the combination of columnname and row Indicator e.g. Column_Name.row[0] and also much quicker(Within 5 minutes range). The records fetched from this snippet are being pushed into another array to have a table like object. function dbRecordToObject(record) { var returnValue = {}; try { if(!record.EOF) { for(var i = 0; i < rec.Fields.Count; i++ ) { returnValue[record.Fields.Item(i).Name] = record.Fields.Item(i).Value == null ? "" : aqString.Trim(record.Fields.Item(i).Value); } } else { Log.Warning("Empty record set"); } } catch(err) { Log.Warning("Error : " +err.message); } finally { return returnValue; } } Any help would be appreciated! Thank you Al2 SolvedRe: FindChildByXpath method is very very slow all of sudden sonya_m Not yet. I had to debug the same program which had been working consistently well for last 3 years. The xpath is available on the page but the FindChildByXpath keeps returning 'null'. I see that I have a little scope for experimenting because TC would work better with it's native functions. There's a reason why I wanted to use xpath here because TC name mappings doesn't work in every situation esp. angualr custom controls. Thank you Al2 Re: FindChildByXpath method is very very slow all of sudden tristaanogre Yes..Object search timed out (in 20 seconds), and returning 'undefined' object. I've checked the xpath which seems to be absolutely correct. I can't think of any other reason why this is behaving like that. Thank you Al2 FindChildByXpath method is very very slow all of sudden Hello, I've been usingFindChildByXpath method for a long time now, but lately I've noticed that this has besome very very slow in finding out the objects. These are the same programs that I've been running for more than 3-4 years. I don't know if this is the chrome version or the TC version or something else. There are some objects for which I have to use this method as there's other option available for custom angular tables. My TC version:14.30.3743.7 x64 Chrome version:80.0.3987.100 (Official Build) (32-bit) Code inside the methods looks like this, but It's just not able to locate the object on the page at all. // Call the function let obj = page.FindChildByXPath("//button[@type='submit']", true); // Check the result if (!strictEqual(obj, null)) { // If the element was found, click it obj.Click(); } Any help would be appreciated! Thank you Al2 Re: Unable to click on an object when using GetElementsByClassName tristaanogre Thanks much! That helps. Re: Unable to click on an object when using GetElementsByClassName tristaanogre I'm sorry, thanks for pointing that out. I made a correction in the code posted above. I was using Exists property and it failed. Thank you Al2