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:
Priority and Severity in Testing. Severity and Priority in Testing? As usually, Tester select Severity of bugs and Project lead or project manager selects bug priority. Priority - Priority is the order in which developer has to fix the bug. Severity … Read More
Generation of Scripts for Windows Application Generation of Scripts for Windows Application Record and Playback:Dialog("Login").WinEdit("Agent Name:").Set "admin"Dialog("Login").WinEdit("Password:").Set "mercury"Dialog("Login").WinButton("OK").ClickWindow("Flight Reser… Read More
Steps to follow before starting Automation Steps to follow before starting Automation Analyze the Manual Test Cases a) Requirement Test suite creation … Read More
How may Types of Recording in UFT / QTP? How may Types of Recording in UFT / QTP? Three types of Recording in UFT/QTP. 1. Normal Recording:2. Analog Recording:3. Low Level Recording:… Read More
Outcome of Running the QTP Scripts Outcome of Running the QTP Scripts Report in UFT 1. Test Fusion Report: 2. Customized Report (Framework):… Read More
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment