To count the no of links present in the yahoo home page i
have written the script like this
Set fileSysObject=createobject("Scripting.FileSystemObject")
Set linksFileName=fileSysObject.opentextfile
("D:\samplelinkfile.txt",2,true)
Set linkDescObj=description.Create
linkDescObj("micclass").value="Link"
Set noOfLinks=browser("yahoo").Page("Yahoo!
India").ChildObjects(linkDescObj)
For i=0 to noOfLinks.count-1
linkName=noOfLinks(i).getROProperty("name")
linksFileName.writeline(linkName)
Next
linksFileName.close
Set fileSysObject=nothing
While running the script it showing error that
object "yahoo"isnot found in the object repository.
Is there any setting before running the script? if yes what
is the steps for it.Im using QTP9.0
Answer Posted / baba
Hello buddy,
Do not bother about this type of small errors.
No need to open new test and record on yahoo page and again
pasting that code here in your code. all these long
process.ofcourse it may work. as a QTP profession you have
to go in efficient way.
Follow this steps.
Once you got that error message.
1. Just Open OR
2. Click on Add Objects button
3. Select your desired objects here (Links your case)
4. Click on Ok
go back to your test and run your test now.
if it not runs, delete your "browser("yahoo").page
("yahoo")... all these things
just add this code
systemutil.Run "www.yahoomail.com"
Set noOfLinks=browser("Yahoo! Mail: The best").Page("Yahoo!
Mail: The best").ChildObjects(linkDescObj)
it will work. no probs
All the best
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
hou can we use vb script in qtp could u tell me breafly
How to connect to a database?
What are the Test design techniques you uses in ur project?
how to post xml data from QTP scripts to any application?
How do you check ticket cost and ticket number in flight application?
Where can I find and view run-time data table?
Explain how Does Run time data (Parameterization) is handled in QTP?
Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach
Does QTP run in any environment?
WAT IS DATA BASE AND XML CHECK POINT ?HOW TO IMPLEMENT IT ... GIVE PROPER EXAMPLE FOR IT
• What type of testing questions will be asked for 2+ yrs exp people in interview?
Hello friends..... On which areas of an application we can not test with QTP
Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?
what are all the fileds present in object repository?
what is error and fault in terms of software quality?