How many ways we can parameterize data in QTP?
There are four types of parameters:
Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test.
Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table.
Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose.
Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have QuickTest generate a random number and insert it in a number of tickets edit field.
I'm gonna post some useful Testing stuffs here,to share the knowledge, enjoy learning.............
Monday, June 30, 2008
Tuesday, June 24, 2008
How to Search a word in word doc
Dim wrdApp
Dim wrdDoc
Dim tString, tRange
Dim p, startRange, endRange
Dim searchString
'Create the Word Object
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Open("D:\pavan\Word.doc") 'replace the file with your MSDoc
searchString = "pavan" 'replace this with the text you’re searching for
With wrdDoc
For p = 1 To .Paragraphs.Count
startRange = .Paragraphs(p).Range.Start
endRange = .Paragraphs(p).Range.End
Set tRange = .Range(startRange, endRange)
tString = tRange.Text
tRange.Find.Text = searchString
tRange.Find.Execute
If tRange.Find.Found Then
msgbox "Yes! " & searchString & "is present"
End If
Next
.Close ' close the document
End With
wrdApp.Quit 'close the Word application
Set wrdDoc = Nothing
Set wrdApp = Nothing
Regards,
PavanKumar Nandagiri...............
Comparing two excel sheets data
This code will open two excel sheet and compare each sheet cell by cell, if any changes there in cells , it will highlight the cells in red color in the first sheet.
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook1= objExcel.Workbooks.Open("D:\pavan\doc1.xls")
Set objWorkbook2= objExcel.Workbooks.Open("D:\pavan\doc2.xls")
Set objWorksheet1= objWorkbook1.Worksheets(1)
Set objWorksheet2= objWorkbook2.Worksheets(1)
For Each cell In objWorksheet1.UsedRange
If cell.Value <> objWorksheet2.Range(cell.Address).Value Then
cell.Interior.ColorIndex = 3 'Highlights in red color if any changes in cells
Else
cell.Interior.ColorIndex = 0
End If
Next
set objExcel=nothing
Regards,
Pavankumar Nandagiri..............
How to get a files from a Folder through VB Scripting
Dim objFSO 'This is the FSO variable
Dim objFolder
' Create the File System Object and get a folder
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("D:\pavan")
' Grab a collection of files
Set colFiles = objFolder.Files
For each objFile in colFiles
'Wscript.Echo
msgbox "Name: " & objFile.Name
Next
Regards,
Pavankumar Nandagiri................
Dim objFolder
' Create the File System Object and get a folder
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("D:\pavan")
' Grab a collection of files
Set colFiles = objFolder.Files
For each objFile in colFiles
'Wscript.Echo
msgbox "Name: " & objFile.Name
Next
Regards,
Pavankumar Nandagiri................
Subscribe to:
Comments (Atom)