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 |
What is a recovery scenario?
What is post recovery scenario?
How many types of recording facility are available in quicktest professional?
What is the use of Testing framework in Automated testing..what are different kinds of Testing frameworks available in Automated testing...
anyone can explain about "Smart Identification" in QTP. what is the use of "Smart Identification" ???
how will u do database testing in qtp? how will u do the same with descriptive programming?
What is the best institute in Ameerpet? If people think Ameerpet is the pride of hyd they need to go to Delhi/Gurgaon/noida you can find the difference.
hi, can u tell me the QTP TEsting process in present real time companies?(beware of this... now a days Recording is not using,, only DP) and don't tell note book answers like step 1 spep2....like this .......post answer with professional skills in simple english words) thank u
How can we translate the steps between the Keyword and Expert Views?
How to make Non reusable actions into reusable action? is that feature available in QTP
how to write vbscript on web applications in qtp. explian with one example?
I have java based application on my computer. Can I install QTP on it? What are system requirements for installing QTP?