Below are some of the useful utility functions in QTP
1. Function to load Library Dynamically:
2. Function to Load OR dynamically:
Loading OR/Libraries
1. Function to load Library Dynamically:
This function will load function library at runtime with the test.
LoadFunctionlibrary(Library Name)
2. Function to Load OR dynamically:
This function will add an object repository to the test dynamically at
run time.
RepositoriesCollection.AddRepositoryName
RepositoriesCollection.AddRepositoryName
Capturing Image/Text
3. Capturing Image at run time:
This will capture the screenshot at runtime
Browser(“…”).Page(“…”).capturebitmap(path
to store image”)
4. Capture Text:
This will capture the text at runtime to the clipboard.
setobjClip=createobject("Mercury.Clipboard")
objClip.SetText(someText)
printobjClip.GetText
Reporting event
5. Reporter.reportEvent:
This will add user defined result to the QTP Results
Reporter.reportEventstatus,Event,Details
6. Reporter.Filter:
This will filter the events to be written in QTP
Reporter.Filter = rfEnableAll
7. Systemutil.run:
This will execute statement similar to what we write in the run in start menu
Systemutil.run(Process)
Thanks for giving important information to training seekers,Keep posting useful information
ReplyDeleteQTP Training in Chennai