Posts

Showing posts with the label CreateObject

Tips to Optimize QTP Scripts to Yield Better Performance

Tips to Optimize QTP Scripts to Yield Better Performance We use Automated-testing tools to optimize our manual testing processes. But in order to reap full benefits of any automated testing tool, we must know the complete ins and outs of the tool otherwise it would be a huge waste of money spent on automation. We have to learn the automation tool very thoroughly. We also need to learn the language of the automation tool to do coding more effectively and efficiently. I believe that a software testing tool is as good as the person who is actually using it. I have been getting so many emails from my esteemed readers asking about HP QuickTest Professional tutorials, QTP tips and tricks etc. Some readers even complain that their QTP scripts are too slow to execute. This time I decided to write a post on how to use QTP more effectively which means how to make our QTP scripts perform better. In order words, this post will throw light on some points, which will optimize your QTP scripts...

Query from text file and retrieve records using ADODB

Query from text file and retrieve records For example we have the following text file “Employees.txt” LastName,FirstName,Department,Role Nandvani,Rajiv,IT,Manager Kumar,PP,Finance,Analyst Shukla,Nikhil,R&D,Programmer Singh,ANIL,QA,Tester ARORA,ANUJ,QA,Team Leader Kumar,Neeraj,IS,Manager Is it important that your text files be formatted like this? It’s not just important, it’s crucial. We’re going to use database techniques to retrieve information from the file, and to do that the file needs to be delimited in some way (in this case, using the comma as the delimiter).

QTP Mercury DeviceReplay vs SendKeys/ Right click mouse

The Device Replay feature is used to perform mouse and keyboard actions against screen coordinates that are provided. The Device Replay functions are not automatically recorded, but must be programmed manually in the Expert View. 1. Create the Device Replay Object. Example: Set DeviceReplay = CreateObject(“Mercury.DeviceReplay”) 2. Call the desired Device Replay function. Example: DeviceReplay.SendString(“Hello, World”) 3. When done with the Device Replay object, release it. Example: Set DeviceReplay = Nothing The functions that can be used with the Device Replay object are (all coodinates are relative to the top left corner of the screen):