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

Explain object spy in qtp.

0 Answers  


What scripting language is QTP of?

1 Answers  


In where you are keeping or maintaining shared object repository (file)in your appliction?

2 Answers   Inlogic,


Hello friends can anybody tell me about the architecture of QTP with diagram of it.this architecture is same for any domain like ERP/Banking/CRM/Healthcare or it's different then please tell me.thanks

4 Answers   Fidelity,


what is a active x control?can any one brief me about active x controls

1 Answers  






What is checkpoints for quicktest professional (qtp)?

0 Answers  


how do u import the test cases written in excel sheet to qtp? and how do u generate the script in qtp for the testcase in excel sheet? plzzzz do answer this question thanks in advance

4 Answers  


What r types of parametarizations?

6 Answers  


what is Entry Criteria and Exit Criteria?

2 Answers  


Where virtual objects stores results?

4 Answers  


Give me some real time point of way where exactly we can conduct audits?

0 Answers   CTS,


what is the difference between Automation object model(AOM) and test object model(TOM)

2 Answers   UHG,


Categories