QTP Automate - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: QTP Automate (/Thread-QTP-Automate) |
QTP Automate - eroshan - 09-09-2009 Hi All I want completely automate the QTP test , that means i want to start the QTP automatically and load(Open) the test file and run the test. I can write a .bat file to open the tool but i was stuck when i try to open my test file. Do you have any idea about like this matter ?? Can QTP handled command lines ? (By windows commands) Thanks RE: QTP Automate - Saket - 09-09-2009 hi eroshan, it would be always better if you can paste exactly, where are you stuck , a piece of code in you bat file can give the better idea. although you can do this using vbscript. copy the code below and save as .vbs file, you can execute this vbs file from command prompt. Code: Dim qtpApp search this forum for more help on this. RE: QTP Automate - eroshan - 09-09-2009 [quote='Saket' pid='7359' dateline='1252473659'] hi eroshan, it would be always better if you can paste exactly, where are you stuck , a piece of code in you bat file can give the better idea. although you can do this using vbscript. copy the code below and save as .vbs file, you can execute this vbs file from command prompt. Code: Dim qtpApp I am very new for vbs Can you explain above code. where should i place my test file name where should i place path of the test file Thanks RE: QTP Automate - Saket - 09-09-2009 Sorry, my mistake I should mention this in my reply replace TestPath with your Test file path. Use this modified code Code: Dim qtpApp RE: QTP Automate - eroshan - 09-09-2009 [quote='Saket' pid='7362' dateline='1252475940'] Hi Saket Sorry its not working , it gives this error Line : 4 Char : 1 Object required : 'qtApp' Code : 800A01A8 Source : Microsoft VBScript error This is my code Code: Dim qtpApp do you have any idea ? can you tell me what is this "QuickTest.Application" for? Thanks RE: QTP Automate - Saket - 09-09-2009 replace 'qtApp.Visible = true' with 'qtpApp.Visible = true' look into 'QuickTest Professional Automation Object Model Reference' in QTP Help for detailed info on this. refer [http://mercuryquicktestprofessional.blogspot.com/2008/05/qtp-aom-and-how-to-write-scripts-in-aom.html]Basics of AOM[/url] RE: QTP Automate - eroshan - 09-09-2009 [quote='Saket' pid='7364' dateline='1252480395'] Hi Saket it works , thank you very much Saket. RE: QTP Automate - eroshan - 09-09-2009 [quote='eroshan' pid='7365' dateline='1252481459'] [quote='Saket' pid='7364' dateline='1252480395'] Hi Saket There is a small question about vbs. i want to close the QTP tool window after run the the test. What is the line should i add to the script?? This is the script => Code: Dim qtpApp Thanks RE: QTP Automate - Saket - 09-09-2009 Add below code after qtpTest.Run statement Code: qtpTest.Close eroshan - always wrap your code with proper tags to make the post mmore readable. Refer Forum Help. |