Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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
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",""
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
Set dlg=Description.Create
Set ocollection = Browser("creationTime:=0").Page("micclass:=Page").ChildObjects(btns)
msgbox ocollection.count

Set ImageObj=Description.Create
Set dlg=Description.Create
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

How do I modify a value of an elemnt which is not the first one in xml file? My sample XML file is like: <Environment> <Variable> <Name>Name</Name> <Value>Uday Kumar</Value> </Variable> <Variable> <Name>Designation</Name> <Value>Senior Software Engineer</Value> </Variable> </Environment> for example, I'd like to change the value 'Senior Software Engineer' to 'Student' in the second element. How do I do it in QTP?

3 Answers   QualiTest,

In QTP can we feed the out of one browser(internet explorer) as an input to the another browser(mozilla firefox)? If yes explain how to do it with an example.

0 Answers   Patni,

Hello everyone! I am just writing a small test for a windows application. I have a problem with a text output value. The value i am trying to catch is presented in a scrollable textbox. When the text is too long, only a portion of it gets captured. Do you have any experience with this?

0 Answers   HSBC, T Mobile,

Which scripting language used by quicktest professional?

0 Answers  

We have 10 rows in datatable at runtime we get error at 3rd row ? what is the procedure for continuing same test from 4th row on wards?

10 Answers  

Among all the check points what is the most important checkpoint?

1 Answers  

hi what is the use of "dim" in automation objective model or any where what is the use of "dim" plz tell me

3 Answers  

How do you move objects from local object repository to shared object repository???What are methods?

1 Answers  

hello, i was install Q.T.P.8.2 in windows xp version .when i am running my programs all the desktop icons are disappear why so. please guide me anybody how can i come out side this problem.

3 Answers  

difference between do while and do until ?

3 Answers   HCL,

How to open any application during Scripting in QTP?

7 Answers   Celgene, IBM,

We are calling Actions in Expert View by using Run Action.but i want to know where we are saving the Actions Scripts.Pls explain??

1 Answers