How u call functions in QTP Function to calculate the

length of characters in a word -

Answer Posted / sreeprasad

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 ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi ,Can any one pleas explain how to test splash objects using QTP?

1914


Explain QTP using different development techniques ?

542


How to open a new test using quicktest professional?

576


How to customize checkpoints with parameters?

3029


I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...

1466






Hi, my requirement is to make a query in SQL using QTP. And i have to get the results of that query and i have to use those results for future testing. I created a driver but i dont know the code for using this Driver. please help me by providing the solution for y requorement

1653


what is the mail use of frame work(with detail). architecture for keyword driven frame work

1427


What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.

1514


What is text check point and text area check point?

616


Define Environment Variable in UFT and its uses?

617


Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance

1525


what is stepin & stepout?

1429


How to suppress warnings from the test results page?

610


How the exception handling can be done using quicktest professional (qtp)?

575


Does QTP record on Objects created on XWindows Environment?

1670