Contributions
Re: Get Keyword Test Name from script code?
Hi, I am also having the similar issue - I want to get a Keyword test name from script and set it in a variable and run that keyword test using Run method by passing the Keyword test variable. Can I get some more information on how did you get the Keywork test name from script code? I am using Jscript. Thanks in advance.2.9KViews0likes1CommentRe: OleValue
Hi, I have also come acorss the silimar issue, could you please let me know how youwrote a script where it would access a set of data fields using "DataContext.FieldName.OleValue" please? I need to write a script which will access the set of Data fields usingDataContext.FieldMappingType.2.4KViews0likes0CommentsTest complete run a count(*) query in SQL server 2012.
Hi.I have let Test complete run a query in SQL Server. It is a select count(*) query which I can successfully run and has just one row and column as result. Now I want to read this result and save it to a variable in Test complete. Can anyone suggest a solution please?1.9KViews0likes3CommentsRe: Find last changed file using JScript
We had to modify the mothod below to get LatestModifiedFile in the specified folder. function FindLastModifiedFileInFolder(FolderPath, FileNameContains) { var FolderObject = aqFileSystem.GetFolderInfo(FolderPath); //The folder to look in var FileItems = FolderObject.Files //Collection of all the files in the folder var FileDateModified = new Array(); //Array of all the relevant date modified info for the files var FileNumber = new Array(); //The absolute index number for the files sorted var LatestFileNumber; //The index to the latest file modified var NewestTime; //Placeholder for the Newest time when searching //Builds up the arrays with the filnames containing FileNameContains reg exp for (var i=0; i < FileItems.Count; i++) { if(FileItems.Item(i).Name.search(FileNameContains) > -1) { FileNumber.push(i); FileDateModified.push(FileItems.Item(i).DateLastModified); } } //Finds the most resent modified file NewestTime = FileDateModified[0]; LatestFileNumber = FileNumber[0]; for (var i=0; i < FileNumber.length; i++) { // Log.Message(i); // Log.Message(NewestTime); if(aqDateTime.Compare(NewestTime, FileDateModified[i]) < 0) { NewestTime = FileDateModified[i]; LatestFileNumber = FileNumber[i]; } } return FileItems.Item(LatestFileNumber).Path; }4.6KViews1like0Comments