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 |
can i compare two databases using QTP ?
What is keyword driven testing..what is the use of this in Automated testing
Thanks....But can u tell me how i use the QTP for GIS with one Example...
How to export QTP results to an ".xls" file?
what are the design objects in qtp
how to do the batch testing in test director using manual testing procedure?
how to test load test and block box testing an a web based application pls give ans briefly
It is given in the help of QTP 9.2 that we cant debug the scripts. Is there any other way to VIEW, PAUSE and make modifications in the scripts during execution???
How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined
What is Modular framework and Keyword drive framework? Explain
What is test object model in quicktest professional (qtp)?
Hi,Every one,my name is RAHUL,aim wondering if any one got QTP software? If yes,can u plz knock on to gchinthakindhi@gmail/yahoo.com. THANK U.