Contributions
Re: WinSCP COM automation fails
HiHelen, I am actually trying to find a way to avoid using the CLR Bridge which is why I was investigating the COM library. I have found that Test Complete appears to have problems resolving the dependencies for theWinSCPnet.dll assembly. This manifests itself by the WinSCP Namespace not being available under the dotNet Object with the only way to get it to work is to register the assembly iin the Global Assembly Cache which has caused issues when executing tests on different machines. I have started writing a static .Net Interface that abstracts theWinSCPnet.dll assembly which so far appears to be working ok. Phil2.9KViews0likes0CommentsWinSCP COM automation fails
Hi, I have registered the WinSCP library as per the instructions on the WinSCP site: Register WinSCP COM I have tried executing the following code to simply open and close a connection: function testWinSCP() { var session = Sys.OleObject("WinSCP.Session"); var sessionOptions = Sys.OleObject("WinSCP.SessionOptions"); sessionOptions.Protocol = session.Protocol_Sftp; // Not sure if correct sessionOptions.HostName = "10.23.0.41"; sessionOptions.UserName = "oracle"; sessionOptions.Password = "Orac1e"; sessionOptions.SshHostKeyFingerprint = "ssh-rsa 2048 25:e2:6e:db:39:9e:50:e0:6f:57:7f:54:07:0a:a2:a1"; try { session.Open(sessionOptions); } catch( e ) { Log.Message( e.message ); } finally { session.Dispose(); } }; but this fails within an "Invalid procedure call or argument" Exception being thrown. What else do I need to do to get this going? It doesn't help with the debugger not displaying any methods or properties of the objects. I believe it is actually creating the objects as settingsessionOptions.SshHostKeyFingerprint to a string that does not match the pattern for ssh throws an Exception stating such. Regards, Phil Baird3KViews0likes2CommentsRe: file object, properties & methods
Hi Manfred, you are correct in that there is only a check() method available for a referenced file. In order to acheive what you require, you will need to utilise methods of the Files and aqFile objects as shown: function accessFiles() { // We have a referenced file in Files cjr_ini. // Test Complete only gives us Files.cjr_ini.Check(); // Use methods on Files and aqFile to get the information wanted, e.g. // Get file path var filePath = Files.FileNameByName( "cjr_ini" ); // Get file content var fileContent = aqFile.ReadWholeTextFile( filePath, aqFile.ctANSI ); // Get file attributes var fileAttributes = aqFile.GetFileAttributes( filePath ); Log.Message( filePath ); Log.Message( fileContent ); Log.Message( fileAttributes ); } Regards, Phil Baird1.9KViews3likes0CommentsRe: TestComplete Enterprise Vs Selenium
Hi Alexei and Masha, thank you for your replies. I have confirmed we have Test Complete 10.5 available for download. Company policy requires I evaluate Test Complete 10.5 before replacing the current version of Test Complete. I need to do this on a machine that has our current version installed with a node locked license. What is the best way to do this? we have floating licenses available if that helps. Also, I was unable to attend the Webinar, it would be great if you could make a recording avaialable. Regards, Phil Baird2.6KViews0likes0CommentsRe: Discrepencies around COM Object registration
Hi Tanya, I have tried re-installing Test Execute as you suggested, by first un-installing Test Execute. However, I am now unable to install Test Execute as the installer thinks Test Execute is still installed: When any option is selected I get the following Feature transfer error: Could you please provide some information on how I might remedy this. Regards, Phil Baird2.1KViews0likes0CommentsRe: Excel data read not happening
Hi ganapati, your code is failing because Sheets is a property of the Excel object, not the Excel.Workbooks object. The following code will: 1. Open an Excel Workbook. 2. Select the "PersonalInformationData" Sheet. 3. Select the Cell "A1" and Log the value contained in that Cell. function testExcel() { var Filepath = "E:\\temp\\test.xlsx"; var Excel = Sys.OleObject("Excel.Application"); Excel.Workbooks.Open(Filepath); Excel.Sheets( "PersonalInformationData" ).Select(); Excel.Range( "A1" ).Select(); Log.Message( Excel.ActiveCell.Value2 ); } Hope this helps. Regards, Phil Baird1.2KViews0likes0CommentsRe: Discrepencies around COM Object registration
Hi Tanya, I can confirm I only have a single instance of "TestComplete Library" registered. Searching the registry for "TestComplete Library" returns the following keys: HKEY_CLASSES_ROOT\TypeLib\{95F851DF-3C2C-493F-8E02-70932B672D5B}\a.0 HKEY_CLASSES_ROOT\Wow6432Node\TypeLib\{95F851DF-3C2C-493F-8E02-70932B672D5B}\a.0 HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{95F851DF-3C2C-493F-8E02-70932B672D5B}\a.0 HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\TypeLib\{95F851DF-3C2C-493F-8E02-70932B672D5B}\a.0 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\TypeLib\{95F851DF-3C2C-493F-8E02-70932B672D5B}\a.0 all of which have the same GUID. I have also noticed the values associated with these registry entries change depending on which of Test Complete or Test Execute ran last. i.e. If I run Test Execute, the value of \a.0\0\win32 is set to E:\DevApps\SmartBear\TestExecute 10\Bin\TestExecute.exe If I then run Test Complete, the value of \a.0\0\win32 is set to E:\DevApps\SmartBear\TestComplete 10\Bin\TestComplete.exe I am not sure exactly what is happening here but it seems rather strange behaviour. Regards, Phil Baird2.1KViews0likes0CommentsAdding files to Files Store doesn't honour Folder structure
Hi, I am currently adding a large number of files to the Files Store of a Project. To aid management of the files, I have defined a virtual Folder struncture within which the files in the Files Store can be grouped. When adding New Items to the Files Store I have found that they are always added to the top level, not within a Folder if it selected. I would have expected, as per other virtual Folder structures in Test Complete, if I select a Folder in the Files Store and add a New Item, that Item would be added under the selected Folder. Is this expected behaviour? Is there a way to force Test Complete to add New Items under a Folder if it is selected? As it is, I have to add New Items and then drag and drop them into the correct Folder, which can get annoying if large numbers of Items are added. Regards, Phil Baird993Views0likes1CommentRe: Discrepencies around COM Object registration
Hi Tanya, thanks for that. Just to clarify, is there an issue around only having a single "TestComplete Library" registered? The first part of the documentation seems to indicate there should be multiple occurances of "TestComplete Library" with one each for TestComplete.exe and TestExecute.exe Regards, Phil Baird2.1KViews0likes0Comments