ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
for example one window is there, the window contains how
many edit box's i want script? i know the script but that is
not exact answer....
The script is like this ..........

set a=description.creation()
a("Native class")="WinEdit"
b=window("Flight Reservation").childobject(a).count
msgbox b
 Question Submitted By :: Brunda
I also faced this Question!!     Rank Answer Posted By  
 
  Re: for example one window is there, the window contains how many edit box's i want script? i know the script but that is not exact answer.... The script is like this .......... set a=description.creation() a("Native class")="WinEdit" b=window("Flight Reservation").childobject(a).count msgbox b
Answer
# 1
use this example for windows alos
Step1: Set Objects = Browser("BrowserName").Page
("PageName").ChildObjects

Step2: Objectcount = Objects.count
Linkcount = 0
Step3: For i = 1 to Objectcount-1
     
       Link = Objects(i).GetROProperty("micclass")
         If Link = "Link" Then
          Linkcount = Linkcount+1
          msgbox Linkcount
         End If 
       Next
msgbox Linkcount ' It show total number links

Set oDesc = Description.Create()
oDesc("micclass").Value = "Link"
Set Lists = Browser("Google").Page("Google").ChildObjects
(oDesc)
NumberOfLists = Lists.Count()
linkcnt = 0
For i = 0 To NumberOfLists - 1
	linkcnt = linkcnt+1
	
Next
msgbox linkcnt
 
Is This Answer Correct ?    1 Yes 0 No
Softwaretester4u
[EDS]
 
  Re: for example one window is there, the window contains how many edit box's i want script? i know the script but that is not exact answer.... The script is like this .......... set a=description.creation() a("Native class")="WinEdit" b=window("Flight Reservation").childobject(a).count msgbox b
Answer
# 2
''''''''Try for this, It will give you all elements/items
count in the webpage'''''''''''''''''''''

url="http://my.naukri.com/manager/createacc2.php?othersrcp=5421&wExp=N"

If Browser("index:=0").Exist(1) then' If Browser is already
opened 
a = Browser("index:=0").GetROProperty("hwnd")
Browser("hwnd:=" & a).Navigate(url)
Browser("hwnd:=" & a).Sync
wait(2) 
Else' If Browser is not opened
SystemUtil.Run"IEXPLORE.exe"
a = Browser("index:=0").GetROProperty("hwnd")
Browser("hwnd:=" & a).Navigate(url)
Browser("hwnd:=" & a).Sync
wait(2)
End If

Set Editobj=Description.Create()'For WebEdits
Editobj("html tag").value="INPUT"
Editobj("type").value="text"

Set Butobj = Description.Create()'For Buttons
Butobj("html tag").value = "INPUT"
Butobj("type").value="submit"

Set Listobj=Description.Create()'For Web Lists
Listobj("html tag").value="SELECT"

Set Linkobj=Description.Create()'For Link
Linkobj("html tag").value="A"'

Set Checkboxobj=Description.Create()'For Checkboxes
Checkboxobj("html tag").value="INPUT"
Checkboxobj("type").value="checkbox"

Set Radioobj=Description.Create()'For Radio Buttons
Radioobj("type").value="radio"
Radioobj("html id").value="ctctype_i"


Set Edits = browser("hwnd:="
&a).Page("title:=.*").ChildObjects(Editobj)
Set Buttons = browser("hwnd:="
&a).Page("title:=.*").ChildObjects(Butobj)
Set Lists = browser("hwnd:="
&a).Page("title:=.*").ChildObjects(Listobj)
Set Links = browser("hwnd:="
&a).Page("title:=.*").ChildObjects(Linkobj)
Set Checks = browser("hwnd:="
&a).Page("title:=.*").ChildObjects(Checkboxobj)


Set Radios = browser("hwnd:="
&a).Page("title:=.*").ChildObjects(Radioobj)

msgbox "Total EditBoxes are :  "&Edits.count
msgbox "Total Button are :  "&Buttons.count
msgbox "Total Lists are :  "&Lists.count
msgbox "Total Links are :  "&Links.count
msgbox "Total checkBoxes are :  "&Checks.count
'msgbox "Total RadioButtons are :  "&r
msgbox "Total RadioButtons are :  "&Radios.count+1
    

''''''If you have any doubts reply to this thread'''''''''''
 
Is This Answer Correct ?    0 Yes 0 No
Rajaputra
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
CAn anybody tell me how can I use QTP to capture any video in my application?I want to see the video file opened in my application after the tests are completed in tests results.Can anybody help me?  6
When we parameterise some field ex. Textbox is there any way that we can generate a specefic number of random values (For alphabetical values if possible) instead of manually entering values in the data table  2
I am executing a batchfile.In one script on one Button i have inserted a checkpoint.It is in a loop,my checkpoint is going to fail sometimes.That failed results only I have to log in a file.How it's possible...pls give the solution for this? Wipro5
in qtp how we work with out put values and what is the process?  4
How can we record an edit box in the Web application ? Kanbay3
how can i add an action(external action) programmatically? Ordain-Solutions2
Hi I able to record IE object but not able to record mozilla firefox 3 object using QTP 10. i don know wats the problem????  2
how to read log file using QTP?? AppLabs2
1)Difference Between Value & RawValue? Wipro1
i need the licence key for QTP V9.5 can anyone help me on getting this?  89
In how many ways we can add check points to an application using QTP.  3
What is the current version of QTP and now it is the product of Mercury or HP TCS9
How can i select multiple items from a WebList bOX USING QTP Syntel3
hi testers,one script has three actions , at the of running three actions are running , how to set run only perticular action and what is the use of split the action? when it will be useful? Syntel2
Can any one please explain hwo to test client/server application using QTP? Value-Labs2
can any body tell me all of the release dates of QTP?????..... thanks in adv!  3
normally by going through the object properties in object spy we write descriptive programming(correct me if i am wrong). But how or from where can we get the object properties in the object spy?plzzzzzz do answer  2
what is option explicit?  5
what is bultin funtaion in QTP &tell me five examples? Kanbay3
w is output value MBT2
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com