HOW TO COUNT NUMBER OF ITEMS PRESENT IN WEB LIST
Answers were Sorted based on User's Feedback
Answer / shobhit kaul
well for this the simplest answer is add that object on
Object Repository and then use the property getRoProperty
("itemscount")
Example::
weblist.getRoProperty("itemscount")
| Is This Answer Correct ? | 19 Yes | 1 No |
Answer / msnreddy
itemcount=Browser("browser name").page("page
name").weblist("web list name").GetRoproperty("items count")
msgbox itemcount
| Is This Answer Correct ? | 17 Yes | 2 No |
Answer / raju & prasad
sorry for the 1st answer
using getitemscount method we can get how many items
present in the weblist
ex: a=window("name").wincombobox("name").getitemscount
msgbox a
if u have any quarries please ask to us.
Raju & Prasad
9823257761 & 9764156846
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / ram.polavarapu
n=browser("").page("").weblist("").getroproperty
("itemscount")
print n
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / sateesh
s=Browser("browser name").page("page
name").weblist("web list name").GetRoproperty("items count")
msgbox s
we get number of items.
| Is This Answer Correct ? | 4 Yes | 5 No |
Answer / raju
to get an HTML source code of Web page
HtmlCode = Browser("Google Labs").Page("Google Labs").Object.documentElement.outerHtml
' save HTML code to a local file
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile("C:\HtmlCode.html", True, -1)
f.Write(HtmlCode)
f.Close()
' run tidy.exe to convert HTML to XHTML
Set oShell = CreateObject("Wscript.shell")
oShell.Run "C:\tidy.exe --doctype omit -asxhtml -m -n C:\HtmlCode.html", 1, True ' waits for tidy.exe to be finished
' create MSXML parser
Set objXML = CreateObject("MSXML2.DOMDocument.3.0")
objXML.Async = False
objXML.Load("C:\HtmlCode.html")
XPath = "//a" ' XPath query means to find all links
Set Links = objXML.SelectNodes(XPath)
Msgbox "Total links: " & Links.Length
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / raju
syn:
x=object Hirarachery. GetContent
ex:
sRegKeys = Window("Registry Editor").WinListView
("SysListView32").GetContent
| Is This Answer Correct ? | 1 Yes | 5 No |
In web page there is five OK buttons available, while recording i click on 3rd OK button, How QTP identify the 3rd OK button while running script? Is qtp identify 3rd ok button?
What are the disadvantages of Recovery Scenarios in QTP ?
what is the difference between function and subroutine ....here every one knows theoretically...here my QUESTION IS WHAT IS THE MEANING OF FUNCTION CAN RETURN A VALUE AND SUB CAN NOT RETURN A VALUE .....WHAT DOE'S IT MEAN FUNCTION CAN RETURN A VALUE HOW FUNCTION CAN AND SUB CAN'T ....GIVE A EXAMPLE FOR BOTH ....HOW IT CAN AND CAN NOT...HELP ANDY ONE....
How to do the Mouse Operations in QTP. How to aacess an Image in a web application to save it on my desktop. To my Knwoledge that can be done by mouse right click on the Image and selecting 'Save the Image'option. Or Is there any alternate way to do this..
Who is the best faculty for QTP in Hyderabad? Is it Mr. G.C.Reddy, some are referring his name?
What is the method for maximize the application while we using Decriptive programming in QTP?
Why do we go for Qtp? What are the advantages of qtp? Diff between winrunner and Qtp?
what is the recovery scenario?
How to use the object spy in quicktest professional (qtp) 8.0 version?
How to attach a file to TD?
Write a script to verify font style and color of a windows object using descriptive programming
pls tell me how will you write the vb script in QTP for DataDriven test from Excel sheet for multiple userid and password explain with example