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
HI Everybody, I am using QTP 9.2, I have a problem and hope everybody help me solve it. Now I need to use mouse wheel event to zoom in or zoom out in web client, but QTP can't catch this event. I look forward helping of everybody. Thank you very much.
Hi, While recording a Jave based web application, its recording all my actions and the objects.And I have 5 WebEdit objects on the page and all are recorded. But while execution, at the 2 WebEdit object, its entering the value into the object (Its making a call to the AJAX, matching the value), when the control get out of this object the value is erased or cleared. Could anyone please help. I have recoreded 5 more scenarios where WebEdit is in the picture on different webpages and all are working fine. Here is my Script: Browser("Sign In").Page("Matching Workbench_3").WebEdit ("locationLookup").Set "0320 - SEATTLE-KM" Browser("Sign In").Page("Matching Workbench_3").WebEdit ("supplierNameLookup").Set "TRAMMO PETROLEUM INC" *** SupplierNameLookup is the object, which is haing an issue. And also I was using the SendString function, but it didnt work.
If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?
What is the default object synchronization timeout in qtp?
Have you used xml check point in your project?
Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.
What is the difference between keyword view and expert view?
what is the structure for the data driven framework
Hi, My name is kishan. I have good Conceptual Knowledge on QTP. In order to Boost up my Confidence Level, I want to do a Project oriented Training only on QTP in Hyderabad. Kindly Let me know which is the Best QTP Project Training Institute in Hyderabad. Thanks in Advance kishan
How you are developing the script? Using record and play back or manual?
What is business process testing(bpt) in qtp?
HOw to add the recovery file at runtime to the test file .
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))
What are the differences between table and db checkpoints?
Which advantages helping QTP to hold the position of "Market Leader" for such a long period?