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 |
How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?
How u do the back end testing in QTP?
How to use the object spy in quicktest professional 8.0 version?
How to carry out bit map check points in QTP
When using descriptive programming?
how can we know the program is testing by multiple test data in data driven frame work?
what is the difference between link and hyper link?
I am not finding pages and links in object spy on web testing. I am only getting window and winobject. where is the problem? thanks
Hi Guys, I want to place all of my values which i am getting it from a loop in to a global shee. For that i had written the script like this For i = 1 to ECOs-1 ECO = List(i).GetROProperty("innertext") DataTable.AddSheet("ECOList") DataTable.GetSheet("ECOList").AddParameter "ECOList",ECO AbortECO = DataTable.GetSheet("ECOList").GetParameter ("ECOList").Value msgbox AbortECO DataTable.GetSheet("ECOList").SetNextRow Using the above script, whenever the loop iterates it is creating new column "ECOLIST" in the sheet called "ECOLIST". It means, the values are displaying in the column wise even though i added the script " DataTable.GetSheet("ECOList").SetNextRow" . The cursor is not moving to the next line. Anybody help me out how to pass the values from script to the excel(Global/Local) sheet. Pls let me know @ nbabu11@gmail.com if you are not clear about the question.
can u pls explain me About Driver script.
What is the difference between CVS and VSS? Are you store QTP SCRIPT In VSS OR CVS? Where you store QTP Script?
1 Answers Brain Roots, Ordain Solutions,
Hello, I am facing problem to check textpoint for mercury application . I have inserted checkpoint to check flight summary for place of departure and arrival with datatable and script look like "Browser("Find a Flight: Mercury").Page("Book a Flight: Mercury").Check CheckPoint("Book a Flight: Mercury_4")" but while I am executing this script at last my check point gets fail and display Text Checkpoint: captured "" between Summary and 4/31/2008FLIGHT , expected "Acapulco" Match case: ON Exact match: OFF Ignore spaces: ON I think value from data table is not fatched so please guide me what I have to do to overcome this problem.. Thanks