How u call functions in QTP

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is output value? How many types of output values are there in qtp?

773


what is key word driven frame work ? why it is called like that ? what is the diference between keyword driven and data driven frame work ?

1772


What is throw Object?

1763


hi i have 4 yrs exp in manual and automation testing using QTP i need sample resumes plz can u send this mail id pbre1980@gmail.com

1621


What is ‘object spy’ and what is the function of object spy in qtp?

750


what frame work you are following?

1697


Explain the check points in quicktest professional (qtp)?

765


How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined

1692


when I was doing the web testing with QTP using with standard checkpoint the Object selection -checkpoint properties dialog box not displaying pages and links hierarchical order. Could you please tell me. thanks

1961


Did QTP prove efficient for your project? Yes or No, explain?

6320


can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com

1966


Is it possible to change the values of analog recording?

798


Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?

1787


What is Port testing. Whhen will you perform?

1695


what type of automation is follwed in the project?

1699