How u call functions in QTP
Answers were Sorted based on User's Feedback
Answer / charan
syntax for function
fun <fun name>(arg1,arg2)
<statements>
end
for example if u want to call mul(3,6)
call mul(3,6)
function mul(a,b)
mul=a*b
end
Is This Answer Correct ? | 23 Yes | 1 No |
Answer / jayalakshmi
Function to calculate the length of characters in a word -
Function countChar(st)/*Vbscript Function
charLength = Length(st)
End Function
Assume above function countChar is written in VBscript, now
you are getting the text from the Application and calling
the Vbscript file and gets the length of the characters in
the word
Dim textValue
textValue= Browser("Browser Name").Page("Page Name").Frame
("mainFrame_5").WebElement("12").GetROProperty("innertext")
executefile "\*.*\countChar(textValue)" /*calling the
Vbscript file
textlength = charLength /*getting the text length
Is This Answer Correct ? | 14 Yes | 12 No |
Answer / hitendra
xyz=checkpal("LIRIL","LIRIL")
Function checkpal( strpal ,outstr )
If strpal =strreverse(outstr ) Then
print strpal &" " & strreverse(outstr )
checkpal="Is Palindrome"
else
checkpal="Is Not Palindrome"
End If
End Function
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / ravinder
first diclare veriable in note pade and save in vbs file
after that go to new qtp program
use the publec ffunction
end function satement go to test resoruses and add
librarey file run the frogram
Is This Answer Correct ? | 3 Yes | 8 No |
Explain different recording modes?
In Object Repository, two actions r there. Action1 name is A.tsr, Action2 name is B.tsr. Is it Possible? if Yes, what is the out put of A+B? if No, why?
How do you change Logical Name of the object in test script?
• What type of testing questions will be asked for 2+ yrs exp people in interview?
Diff b/n image n bitmap checkpoints?
What is operator in VB Script?
What is Curd testing?
In an application you have a web table. You are provided with an external Excel sheet with the same structure as that of the web table. How will you retrieve all data from the web table and compare it with corresponding data available in the excel sheet, using QTP? How will you report the results in QTP?
whare exactly we have to use functions and sub routain
anyone can explian about types of "Triggere Events" in QTP
How to display the first 3 letters in these "ABCDEFGH" using qtp script?
we r conduction testing on a project USING QTP, regarding that project the object repository is full ? Till that project having objects that r not recognised by repository, then what wil you do? How we wil recogine remailning objects? Is it possible to maintain another shared(or)peraction repository? what is the maximum capcity of object repository? How the technical people decide this much object repository is enoughf for this project?