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

How many lines of code in each script of QTP?

4026


Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

1564


Hello, Is there any way to send the test results in html format (or any other) by email using outlook after the test run ends? thank you in advance

1733


Hi! Using Descriptive Programming How do we get Parent object for an object by writing script(DP). Say, i want to get a parent object for a "Link" in a web page by writing script in Descriptive Programming.

2093


I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.

1571






Diff b/w Health care domain and Banking Domain?

4209


What are the differences between qtp and winrunner?

517


Can the user toggle between using Local OR and shared OR for the same action?

550


What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?

627


What ate the Technologies supported by QTP?

636


What is the basic concept of quicktest professional?

524


How will you check a web application for broken links using qtp?

542


Is it possible to change the property value at runtime? How it is possible?

566


In qtp, explain what is qrs file?

577


What are the major/ important methods, functions in QTP we use realtime testing

2257