Contributions
Re: Passing Commands in Command prompt using VB Script
Hi, I would like to thank Alex, Allen and Madhi for their valuable suggestions and taking out time for my query. I got the workaround for my query and have resolved the issue using Batch file. Thanks once again to Alex, Allen and Madhi. Thanks and Regards, Anupa1.5KViews0likes0CommentsRe: Passing Commands in Command prompt using VB Script
Hi Allen, Thanks a lot for your findings and suggestions. I will go through the topic you have mentioned for "Testing Console Applications" . Also, will try to investigate more on the issue appearing at my end with respect to 'Edit -- Paste ("~ ep")' operation in Command Prompt. Thanks and Regards, Anupa1.5KViews0likes0CommentsRe: Passing Commands in Command prompt using VB Script
Hi Alex, Thanks a lot for the suggestion. I tried doing it. But got the following message in the Test Result after running the script and the workbook could not be open. Message shown in the Test Log of TestComplete after running the script was: Some characters cannot be interpreted as keystrokes in the string '~[Space]ep'. See the description of the Keys function in the help system. Sys.Process("cmd").Window("ConsoleWindowClass", "C:\WINDOWS\system32\cmd.exe", 1) Thanks and Regards, Anupa4.3KViews0likes0CommentsRe: Passing Commands in Command prompt using VB Script
Hi Allen, Thank you for the suggestion. I tried doing the same that is I passed the command as mentioned by Alex using VB Script as: Sys.OleObject("WScript.Shell").Run "D:\BookMark.xlsx" and it worked fine. But the moment, I open the Excel 2007 normally by going to Start --> All Programs --> Micrisoft Excel 2007, the application crashed giving the error as: '(null) is not valid win32 application'. Later, I was not able to open any Excel workbook. I had to repair the Excel again. So, I cannot use this command (Sys.OleObject("WScript.Shell").Run "D:\BookMark.xlsx")through TestComlete as it is crashing my Excel. My machine configuration is: Microsoft Windows XP, Professional Version 2002 Service Pack 2 Inter(R) Xenon(R) CPU E5405@2.00GHz 1.99GHz, 2.00 GB of RAM Microsoft Office 2007 is installed. Application we have developed is an Add-In in Excel. So, need to open an Excel workbook through Command Prompt which will contain the objects associated with this add-in. The check here is to verify whether the workbook opened through Command Prompt still contains the objects which are associated with the Add-In which we have developed for our Client. Thanks and Regards, Anupa4.3KViews0likes0CommentsRe: Passing Commands in Command prompt using VB Script
Hi Alex, Thanks a lot for your suggestion. But, I still think it would be great if you can suggest some way by which I can pass Colon ( : ) and double quotes ( " ) to Command Prompt using VB Script as explained in my Query. Thanks and Regards, Anupa4.3KViews0likes0CommentsRe: Passing Commands in Command prompt using VB Script
Hi Allen, Sorry for the inconvenience. I will take care of it in fututre. The link you have provided http://www.automatedqa.com/forums/forum/post.aspx?mode=singleThread&thread=06ed2ae9-0902-4d27-a075-ca5293c1dee4does notexactlyanswer my query. It would be great, if you can tell me the way to pass Colon ( : )and double quotes ( " ) to Command Prompt using VB Script asexplained in my Query. Regards, Anupa930Views0likes0CommentsRe: Passing Commands in Command prompt using VB Script
Hi Alex, It is one of the test case for my application. So, I need to automate it. The test case is such that, I need to verify whether the workbook created using my application opens through Command Prompt using the mentioned command as C:\Program Files\Microsoft Office\Office12>EXCEL.EXE "D:\BookMark.xlsx". Regards, Anupa4.3KViews0likes0CommentsPassing Commands in Command prompt using VB Script
Hi, I am using TestComplete version 5.15.561.7. Language used is VB Script. I am automating one test case where in it opens the Command prompt --> changes the directroy to where office 2007 is installed --> and then opening one saved Excel workbook For example: Call Command_Prompt_Window.Keys("c:[Enter]cd C:\Program Files\Microsoft Office\Office12[Enter]\Excel.Exe ""D:\BookMark.xlsx""[Enter]") where Command_Prompt_Window = NameMapping.Sys.Process("cmd").Window("ConsoleWindowClass", "*") While playbacking the script, the data passed as ("c:[Enter]cd C:\Program Files\Microsoft Office\Office12[Enter]\Excel.Exe ""D:\BookMark.xlsx""[Enter]" is not taken properly. For example Colon(:) gets typed as ">" and quotes get typed as "@"in the Command Prompt editor Can any one please tell me how doI automate the script using VB script so that the Colon and the quotes are entered properly in Command Prompt when the script is play back? Regards, Anupa22KViews0likes19Comments