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 they Advantages and Disadvantages in QTP 9.2?
Plz send one Tracebilitymatrix example? Anybody working on Realtime QTP Plz give contact deatils?
why we use sendkey method in qtp?
Find the 'String' from excel sheet and save to another sheet.But we don't know the string column number and row number?
What is difference between Quality centre and Test Director?
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
What are the Levels of Automation in QTP
Hi! Using Descriptive Programming How do we get Parent object for an object. Say, i want to get a parent object for a "Link" in a web page. thanks
How you r using QTP in u r project
1 Answers IBM, Lehman Brothers,
Hi all , I have installed the QTP 11.0 Whenever I am opening QTP that time if any open Internet Explorer I was getting message (Internet Explorer has encountered a problem and needs to close. we are sorry for inconvenience caused) and same way new browser also not opening. If you have any idea please let me know.
how to pass parameters from one action to another using output parameters I am not calling action 2 from action 1, they are being called individually I need syntax please .. Requirement: Action 1 customer = Browser(" ").Page(" ").Link(" ").GetROProperty("value") I want to use the value stored in customer in Action 2 I do not want to use any of these actions as re-usable actions
Can the user toggle between using Local OR and shared OR for the same action?