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 we take 'dim my pen is good' as a paramerter
Where we use data driver in qtp?
What type of automation frame work you are using?and why?
hi Sudhananda reddy, in my resume, i written as , I Am working as a Test Engineer for xyz company. IS IT RIGHT OR WRONG? WHAT IS THE ACTUAL meaning of "IN XYZ COMPANY", "FOR XYZ COMPANY", "WITH XYZ COMPANY".
Suggest and Define a solution for an application whose objects are not recognized by UFT?
Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...
How does QTP identifies the object in the application Mainly objectives are three type's OF PROPERTIES namely
desribe a situation where u faced a stressful situation and how did u cope with it
When i used this below script to insert value in the Datatable... At run time it was inserting the given value in the specified column, But after execution all those inserted values were cleared automatically... datatable("column name",sheetid)=value
hi i am working with vbwindow on qtp.first i am openning qtp whenever open qtp my application not open that time generated error like "Runtime error 0" and fatal error:automation error how to solve this problem pls tell me
example-date format is 01-jan-09 in QTP.How to convert this format to 01-01-09?
Hi, OUR PROJECT NAME IS: HOSPITAL CONTROL SYSTEM. IS IT COMES UNDER WHICH DOMAIN(HEALTH CARE OR HEALTH INSURANCE)