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 are the limitations of smart identification in qtp 9.0
I want to create Excel object on another machine which is in network i written the code "Set se=createobject ("Excel.Application","\\ankur")"here \\ankur is the name of that machine but i m getting the error of permission denied create object can anybody help me
How to find RAM size by using QTP?
how to parameterise a test with data base table or excel sheet?
What are the Levels of Automation in QTP
Explain the difference between smart identification and object identification withn clear example. please it is very urgent
Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers
what will be there in keyword view and expert view?
In the website, the protocol has been changed http: to https what you will do? Tell me your approach?
What is fragmentation and paging?
we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?
HOW TO DO THE BATCH TESTING USING QTP?