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

how to acess a test in RSA?

1671


I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?

1567


What is the difference between run time object and test object?

579


is there any addin for remedy user application

1744


What are the methods used in UFT to handle exceptions or run-time errors?

647






What is exact meaning of Database Checkpoint in QTP 9.2 and what are the different types of the database check points?

2267


Explain actions in qtp ?

557


explain keyword driven framework with banking domain?

1565


I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...

1717


What are the steps involved in recovery scenario wizard?

529


How to associate function library at a run time?

706


I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

1723


Which functionalities of QTP used in banking project?

1924


I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format. Hence, if possible, kinldy mail PDF file to my mail-ID: sushmapokhriyal79@gmail.com

1496


What does it mean when a check point is in red color? What do you do?

567