Monday, August 11, 2008
How to open any application using scripting?
A SystemUtil.Run statement is automatically added to your test when you run an application from the Start menu or the Run dialog box while recording a test
E.g : SystemUtil.Run "Notepad.exe"
How will you customize the Active Screen settings in QTP?
The more information saved in the Active Screen, the easier it is to edit the test or component after it is recorded. However, more information saved in the Active Screen adds to the recording time and disk space required. This is especially critical in Visual Basic, ActiveX, and .NET Windows Forms environments.
We can customize the Active Screen setting, by using “Custom Active Screen Capture Settings”.
To do this follow below navigation:
Tools > Options > Active Screen Tab > Click on custom level button > configure as per your needs and click Ok.
Friday, August 8, 2008
What is Smart Identification?
Configuring Smart Identification properties enables you to help QuickTest identify objects in your application, even if some of the properties in the object’s learned description have changed.
If QuickTest is unable to find any object that matches the learned object description, or if it finds more than one object that fits the description, then QuickTest ignores the learned description, and uses the Smart Identification mechanism to try to identify the object.
The Smart Identification mechanism uses two types of properties:
Ø Base Filter Properties.
Ø Optional Filter Properties.
Selecting the Enable Smart Identification check box for a particular test object class instructs QuickTest to learn the property values of all properties specified as the object’s base and/or optional filter properties in the Smart Identification Properties dialog box.
Thursday, August 7, 2008
How to create a folder and delete a folder
Set fileSysObj=createobject("Scripting.FileSystemObject")
On Error resume next
fileSysObj.createfolder(folderPath)
If Err.number<> 0 Then
reporter.ReportEvent micFail,"createfolder","Unable to create the specified folder"
End If
If fileSysObj.folderexists(folderPath) Then
fileSysObj.deletefolder(folderPath)
else
reporter.ReportEvent micFail,"folder delete","The specified folder does not exist"
End If
Friday, July 18, 2008
What is the difference between Wait and Synchronization point?
Local and Global.
For an object there is a Global synch time (20 seconds by default)(Available under File->Settings->Run in QTP 9.0) and additionally we can set individually the synch time for a particular object.
Hence total synch time is = Local + Global synch time.
In wait there is no Global concept and it is local to that object only.
Another key difference is: Suppose we have put a wait for 10 seconds then the application would wait for 10 seconds unconditionally. But say if we put a synch point of 10 secs say for an object to appear(local) and default Global synch time is 20 seconds, then total synch time for that object is 20 + 10 =30 seconds, but in case the object would appear in 15 seconds itself, even though the total synch time was 30 seconds, the script would proceed to the next task.