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
Explain the features of quick test pro(qtp)?
How often were they executed?
Can U Explain about QTP tool from older version to latest version also its differences?
I have created 3 actions in test action1, action2, action3 but I want run action 1,action 3,action2 how can you change in the actions in keyword view?
Define object spy ?
Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance
Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B
What is QTP and the use of QTP in TD?
What are the two types of repositories available, explain them?
What is checkpoints for quicktest professional (qtp)?
How to find the difference between 2 dates in qtp?
PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
in a web page hoe to check the dynamic links that rechabging with out using regular expressions
What are the advantages of Object Repository?