In google i'm going to search something like "rose", i usually get 10 results in the first page and in 2nd page 10 results and in 3rd 10 results so on upto 10th page 10 results. so if i want to open all the 10 pages 10 results i.e., 100 results and close..what is the DP for this? pls can anyone answer my Question..PLZZZZZ...
Answers were Sorted based on User's Feedback
Answer / gaurav anand
there would be many links in the google search page.Some are actual search results and some are ads and recommendations, ads etc.. So, first task is to classify these links. It can be achieved by using webtable concept as these links would be in different webtables. Now, fetch the links in the search results webtable by using the row and the child objects property. After that,for each link, open and close it and when this loop is done , click on the next page arrow present in the page in the outer loop.When this loop is done, scenario is covered.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sathya
Set odesc = Description.create
odesc("micclass").value="Browser"
Set Listofbrowser = Desktop.ChildObjects (odesc)
Counter = Listofbrowser.count
Msgbox Counter
For i=0 to Counter-1
val1 = Listofbrowser(i).Page("title:=Rose - Wikipedia, the free encyclopedia").WebElement("html id:=content").GetROProperty("innertext")
Msgbox val1
val2 =Split(val1, "rose" )
val2 = Ubound (val2)
Msgbox Val2
Listofbrowser(i).close
Next
Please correct me if am wrong.......Thanks
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / usha
Set d = Description.create
d("micclass").value="Browser"
Set browsers=desktop.ChildObjects(d)
msgbox browsers.count
Set od = Description.create
od("micclass").value="Link"
'od("index").value=j
od("name").value="Rose.*"
od("html tag").value="A"
For i = 0 to browsers.count-1
'msgbox browsers(i).getroproperty("innertext")
Set links=browser("creationtime:="&i).page("name:=.*").childobjects(od)
msgbox links.count
For j = 0 to links.count-1
msgbox links(j).getroproperty("innertext")
Next
Next
Is This Answer Correct ? | 0 Yes | 1 No |
If the each result page opens on the same window
set objHierachy=Browser("title:=Google.*").page("title:=Google.*")
With objHierachy
.WebEdit("name:=q")
.set "rose"
.WebButton("name:=btnK")
wait 2
'by default the search result shows in 1st page,
'so will write code for next 9 pages to see the result.
' if the next pages opens in the same window
For i=2 to 10
.Link("name:="&i).click
If i=10 then
.close
End If
Next
End With
Is This Answer Correct ? | 0 Yes | 2 No |
How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?
Hi, Plz give best Definition of Software Testing? Why we need Software Testing? and plz send 2+yrs experience Interview qutions (Manual,Qtp).
How to change the Default synchronization method time and where?
what is the code in QTP to take screen shot?
What is a recovery scenario?
what are the 5 types of objects in qtp
What are the advantages of QTP over WinRunner?
1. How to capture data from images in QTP and produce them in Excel sheet ? 2. What is Terminal Emulator add-in installation and configuration procedure ? 3. Tell me how do u define action and transaction in QTP ? 4. Is QTP case sensitive ? 5. Problem with XML checkpoint ? 6. When was QTP 8.2 and Loadrunner 8.0 officially released to the market ? 7. Can we record on netscape browser does it require any special settings ? 8. How do I add new object to the object repository to any particular frame ? 9. Do we have rapid test scrpit wizard in QTP ? How to learn all the windows and objects in QTP 10. How to open Exceel sheet using QTP script ? 11. Is it necessary to learn VB script to work with QTP or we can manage with keword driven ? 12. What is descriptive programming in QTP ? 13. How to invoke the QTP from dos prompt and run a test without any interaction with human ? 14. What is the meaning of Context sensitive ? 15. How to retrive the property values from "Resource.mtr" after recording the script with "Standard checkpoints" ? 16. Where should we use accessbility checkpoints. Can u explain me with the example ? 17. How do we add object repository dynamically ? (During runtime) 18. How to record right click of a context menu and click on the selection ? 19. How to connect oracle database to QTP ? 20. How will you load few objects in Active Screen ? 21. Can I compare two DataBases using QTP ? 22. If the the two object have same class then how QTP will find the object ? 23. Can I change the runtime properties of an object ? How can I check if a parameter exists in database ? 24. What is the script for database check point, bitmapchek point, regular expression ? 25. What is QTP environmental variable ?
hi friends i was tried to connect qtp with oracle database using provider.i got a error.so anyone can help me out by correct script
Cn u please clarify my doubt Where are micTab and micReturn used.Thanx in Advance
how u conduct GUI testing and PERFORMANCE testing on MS- WORD? and What r the GUI Test Cases and performance Test Cases?
3 Answers Accenture, Civil Service, ICICI, Jintek, Satyam, Singularity, Syntel, TCS, Wipro,
Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.