Tuesday, January 8, 2019
4:53 PM
World Business Zone
UFT Automation
No comments
Child Objects Method in QTP
Child Objects
This method will display the count of the needed objects that we needed specifically from the application.
For Example:
1. We might be need the no. of Links (Links)
2. We might be need the no. of Buttons (WinButton, WebButton)
3. We might be need the no. of Editbox (WinEdit, WebEdit)
To display the count of the objects present in the same name we can declare the below syntax.
Example: 1
'Display the count of the links present in the google page:
Set lnk=Description.Create
lnk("micclass").value="Link"
Set brw=Description.Create
brw("name").value="Google"
Set olinks=Browser("name:=Google").Page("title:=Google").ChildObjects(lnk)
msgbox olinks.count
Example: 2
'Display the count of the buttons present in the qtp default flight application landing page:
Set btns=Description.Create
btns("micclass").value="WinButton"
Set dlg=Description.Create
dlg("name").value="Login"
Set ocollection=Dialog("text:=Login").ChildObjects(btns)
msgbox ocollection.count
Example: 3
'Display the count of the Edit Boxes present in the qtp default flight application landing page:
Set btns=Description.Create
btns("micclass").value="WinEdit"
Set dlg=Description.Create
dlg("name").value="Login"
Set ocollection=Dialog("text:=Login").ChildObjects(btns)
msgbox ocollection.count
Related Posts:
Types of Objects in UFT Types of Objects in UFT 1. Run Time Object: Physical description of an object is called an run time object.Ex: (Editor, Button, Link, Checkbox, RadioButton, ComboBox, Wi… Read More
Windows based Test Objects and Test Operations Windows based Test Objects and Test Operations Below are some of the windows application Test Objects, Based on the object stored in repository the test objects are been created in Recording and also by manually giving the… Read More
Generation of Scripts for Web Application Generation of Scripts for Web Application Record and Playback:Browser("name of the application in the browser").Page("name of the page in the browser").object("name of the object identified").OperationSo, This is the basic … Read More
Debug the QTP Scripts Debug the QTP Scripts 1. Pause2. Step into3. Stepout4. Stepover5. Debug Viewer … Read More
Concept of Object Repository (OR) Concept of Object Repository (OR) Add Objects:Resources --> Object Repository (Ctrl+R) --> Objects --> Add Objects to Local --> Choose the Auto (or) Object --> All object TypeBy doin… Read More
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment