Showing posts from 2010

QTP Best Practices

HP Quick Test Professional is a test automation tool, also known as QTP. It is used to automate functional, regression & smoke test cases. It is a very popular tool and works on MS windows O/S, supports development technologies like Active X, Delphi, Java, .Net, Oracle, People Soft, web, Web services etc. This article discusses about best practices while doing automation using QTP.     Don’t use msgbox function, this function pauses the script execution & requires user intervention. This defeats the objective of unattended script execution. To store or display error message and execution log use QTP inbuilt Reporter object.Follow coding guidelines like comments, variable & function name declaration.Use option explicit to enforce variable declaration. Always define variables at the top of script & function fileNeither hard code test data nor read value using custom function like Inputbox. Use parameterization to enhance reusability of code. QTP provides inbu…

How to Perform right Click Using QTP

'The below code can be used to perform mouse right click whereever required 
Browser(”Browser”).Page(”Page”).WebTable(”table”).FireEvent “onclick”,,,micRightBtn‘Right clicking on the object