1. I have asked the same question for the third time, but
i am getting wrong answers.
Pls give me the script to count the number of edit boxes or
checkboxes in an windows application screen.
In windows application childobject is not working, anyone
very urgent
Answers were Sorted based on User's Feedback
Answer / hemakumar.m
i am using 9.5. for u i giving one more solution verify it.
Dim oDesc
Set oDesc=Description.Create()
oDesc("micclass").value="WinEdit"
iObjCount=0
For iIndex=0 To 100
If Dialog("regexpwndtitle:=Login").WinEdit
(oDesc,"index:="&iIndex).Exist(2) Then
iObjCount=iObjCount+1
Else
Exit For
End If
Next
msgbox iObjCount
iObjCount gives editboxes count. u can keep what ever value
u want for ending of for loop.But it must be greater than
equal value,then only u can get correct number.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / raju
SystemUtil.CloseProcessByName "flight4a.exe"
SystemUtil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
Set oDesc=Description.Create
oDesc("micClass").value="WinEdit"
Set oChildern=dialog("regexpwndtitle:=Login").ChildObjects
(oDesc)
msgbox ochildern.count
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / hemakumar.m
i am getting correct answer. childobjects is working for
windows apps.It is better to mention error description.
in ur coding u kept small c when getting the count as u
mentioned above.
Set oDesc=Description.Create
oDesc("micClass").value="WinEdit"
Set oChildern=dialog("regexpwndtitle:=Login").ChildObjects
(oDesc)
msgbox oChildern.count
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / dimple
Hi subhash
find the below simple code
Set objdes=Description.Create
objdes("micclass").value="WinEdit"
Set objchild=Window("text:=Flight Reservation").ChildObjects
(objdes)
c=objchild.count
msgbox c
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nath t
which version are you using. if u are using 8.2 version the
above code is not executed. u can use above 8.2 version of
QTP.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / amrita
even i am facing the same problem what was faced by subash
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / suganya
i am also not getting the count it is showing o as result.please help me
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / subaash patil
Thanks a lot Hema Kumar, Nath, and Raju
I just had missed using the word SET in the code.
It is now working fine
Subaash Patil
Is This Answer Correct ? | 0 Yes | 1 No |
how can i parameterize a login page by using database parameterization i fetch the username and password from database and put this on login page and click on ok button. so how can we write script for that code please let me know asap thanks
What is the difference in between function and sub as well as give some code of both
In this bellow script QTP is not able to getting no. of Links from my Browser. Set desc=description.create desc("micclass").value="Link" Set obj=Browser("creationtime:=0").page("title:=.*").childobjects(desc) msgbox obj.count I am getting "General Run Error".Why QTP is not supporting my Browser,but its running fine in other system.Please help me to overcome this problem.
in order to start automation testing what we should require (entry level to automation testing)
1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?
Am going to QTP testing......but i dont know coding languages like (c,c++,java,etc)and am not having interest in coding .............can i choose testing tools like qtp to learn and get a job in software......please reply me
i'm testing the webpage with QTP, in this wabpage i have to choose the CV from the window, but QTP can't recognize the object, so i used the Low LEvel Recording, but every time i run the test, QTP go to halt when it gets to the Recorded part, any solution for that?( except puting delay in the script and manuall selecting, because i've did that)
What is the another extention name of library file.If that is exist than what's the differnce between them.
why qtp supports vbscript? and not for others just like cgi,phython,shell,perl,html and all..
Hi,can anyone tell me How to found the number of 1's and 2's in the given format 1,1,2,2,3,3,4,2 using vbscript Thanks in advance
Can u call winRunner scripts from QTP?
Hi, When iam trying to import sheet to the QTP Global data table at the run time using the Importsheet method.It is able to import the sheet but no data is present after the import due to which the test is failing.Could anyone suggest what should be done. When I open the actual excel sheet data is present and is not corrupted.