Can Any One Write How to Write the Script for Child Objects
Answers were Sorted based on User's Feedback
Answer / deven
Dim obj_ChkDesc
Set obj_ChkDesc=Description.Create
obj_ChkDesc(“html tag”).value = “INPUT”
obj_ChkDesc(“type”).value = “checkbox”
Dim allCheckboxes, singleCheckBox
Set allCheckboxes = Browse(“Browser”).Page
(“Page”).ChildObjects(obj_ChkDesc)
For each singleCheckBox in allCheckboxes
singleCheckBox.Set “ON” Next
Note: It will check all the check boxes on the page with
Child object
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sandeepguttikonda
Child Objects are used to perform the operations on similar
data.
Example: to get the total number of link in a Page:
And we can perform this by using the below code:
/* Creating the description object*/
Set oDescFrame = Description.Create
oDescFrame("micclass").Value = "links"
Set Links_Count = Browser("name:="&Browsername).page
("title:="&Pagetitle).ChildObjects(oDescFrame)
Msgbox &Links_count.count
This will display the total number of links in a page.
Please let me know if you need any further info.
Thanks.
Regards,
Sandeep Guttikonda
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / manohar
Sorry , Actuvally i want the Example script for Using the
Child objects.
Iam not sure of using the Child Objects . I know the script
that which you had written for Fikle system Objects.
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / kanda
Here i am giving one example to create New file in New
Folder and to write a "Hello World" in that file
File System Object Model
----------------------------
set fso =createobject("scripting.filesystemobject")
set newfolder = fso.createfolder("C:\QTP",True)
Set newfile = newfolder.createtextfile("C:\QTP\Test1",True)
newfile.writeline("Hello World")
newfile.close
Try with tis..I hope it will work
| Is This Answer Correct ? | 1 Yes | 4 No |
What will be the test script in QTP to test a ComboBox where a user has to select more than two items????
What are the three challenges U faced during automation testing of your application.
What is an other way of "Wait" statement in QTP I dont want to use wait("Some number"). Can any one tell this please..........
How to retrive the property of an object?
Why do we use breakpoints in QTP?
If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened. What would be Descriptive programming for this in QTP using VB Script..??? Please send your answers.
Please Explain The QTP real Testing process with steps.
Where we write the FUNCTIONS, in Expert view (or) in any textfiles like Notepad and save it in Library functions folder? How to cal that functions to our script? How to save that functions to Function generator?
when i try to recognise a winmenu item it does not allow me to do that but recognises it as window..i am using qtp 9.2 could someone help with this
can any body help me out by providing links/material for descriptive programming in QTP otherwise can you post decriptive programing based interview Questetion&ans. plz help me out . i need it.
i have to prepare qtp certification course. so, please send me qtp tutorial notes.
Hi I am from delhi, Now I can surely say that no institution of QTP here in Delhi After reading you people I want to get cry, from last six month I am trying to learn QTP, I have knowledge too but dont know VB Script. Now it appears that without learning QTP no one can learn complete QTP, I want to get a formal learning in QTP. Can you suggest me the best institution. and please let me know the charges and span of the course too. thanks in advance to you alkaa.dugaal@gmail.com