How to count no of edit boxes on the page?

Answers were Sorted based on User's Feedback



How to count no of edit boxes on the page?..

Answer / babu

Set oDesc = Description.Create()
oDesc("micclass").Value = "Webedit"
Set Lists=Browser("Login").Page("Application").ChildObjects
(oDesc)
NumberOfLists = Lists.Count()
msgbox NumberOfLists

By using above statements you can find the count for no of
edit boxes in a page.

Correct me if i am wrong.

Is This Answer Correct ?    25 Yes 3 No

How to count no of edit boxes on the page?..

Answer / guru

'Count the Number of Edit box

Set Desc = Description.Create()
Desc("micclass").Value = "WebEdit"
Set EditBoxes = Browser("").Page("").ChildObjects(Desc)
MsgBox "Number of Edits: " & EditBoxes.Count

By using above code you can find the count for no of
edit boxes in a page.

Correct me if i am wrong.

Is This Answer Correct ?    5 Yes 2 No

How to count no of edit boxes on the page?..

Answer / jaivir singh

Hi All,

Please use below DP to Counts(Links,web Button and WebEdit Box)of any web applications.simply you need to copy from here and past in QTP.



SystemUtil.Run "iexplore.exe","https://accounts.google.com/ServiceLogin?hl=en&continue=https://www.google.co.in/%3Fgws_rd%3Dcr%26ei%3De_HIUsCCNcqOrgfT0oCAAQ"
wait 10
Set Desc = Description.Create
Desc("micclass").Value = "WebEdit"
Set Edits = Browser("creationTime:=0").Page("micclass:=Page").ChildObjects(Desc)
MsgBox "Number of Edits: " & Edits.Count

Set LinkObj=Description.Create
LinkObj("micclass").Value = "Link"
Set Links = Browser("creationTime:=0").Page("micclass:=Page").ChildObjects(Link)
MsgBox "Number of Links: " & Links.Count

Set btns=Description.Create
btns("micclass").value="WebButton"
Set dlg=Description.Create
dlg("name").value="signIn"
Set ocollection = Browser("creationTime:=0").Page("micclass:=Page").ChildObjects(btns)
msgbox ocollection.count

Set ImageObj=Description.Create
ImageObj("micclass").value="Image"
Set dlg=Description.Create
dlg("name").value="Image"
Set oImage = Browser("creationTime:=0").Page("micclass:=Page").ChildObjects(Image)
msgbox oImage.count

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More QTP Interview Questions

key word driven frame work is like a folder structure Question is that where is the folder like funtion library folder,object repository,data base,application scenerio folder etc are store whether in a remote machine where we have to access or in our machine (it just like VSS)

0 Answers   Kanbay,


How can we translate the steps between the Keyword and Expert Views?

1 Answers  


what is the use of automation objective model?where is used? plz tell me

2 Answers  


Explain how qtp identifies objects?

0 Answers  


what is the smart identification techniqu?what r the different mechanisums used in it?

2 Answers   Accenture,


How can i open 5 multiple browser at once through QTP VB script

4 Answers  


How can i get the image text that changes dynamically? Here i have used "GetROProperty", but it's not working. I used like Ex:Browser("webmail").Page("inbox").image ("captchaimage).getroproperty("innertext/text/value")

0 Answers  


What are the Disadvantages of shared object repository?

0 Answers  


Does QTP provides any tools for parametarization?

3 Answers   BirlaSoft,


How to compare 2 excel files using QTP? How to compare 2 PDF files using QTP?

1 Answers  


Can anybody help me for vb script in qtp? give me examples for practice plz.

0 Answers  


Dear sir, i want to perform a QTP automated testing for mechancial engineering software like msc adams, msc nastran this softwares will help for mechanical engineering design analysis>> i know oad runner win runner, test director, QTp>> but i dont know how to use for automation

0 Answers  


Categories