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 |
What is a Dictionary object in QTP.?
how can i prepare for QTP(8.2) to face interview ? give over view details?
Explain what the difference between Shared Repository and Per_Action Repository
How to define array in qtp?
What is Environment Variable and when we apply this in QTP?
how do you run scripts in QTP?please anyone can answer my questions
How can you give wait up to 10 seconds in qtp?
Hi, My Application in Microsoft Dynamic Navision, is it compitibale with QTP? if yes then let me know...and also let me know is there any other automation tool availabe to automate Microsoft Dynamic Navision. Thanks Sandip. +91-9714177088
write a script for get the following result: username password frm the string1="A=username" string2="B=password"
Hi all im having a pop up validation browser which is 20 in number, i want to close those similar pop browsers one after the other, is there any specific code for that? i tried by giving creation time & putting in a loop but it dint work? valid working answers will be greatly appreciated
setroproperty and getroproperty difference
What is the use of ordinal identifier in qtp?