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 |
How to test whether the navigation i.e. from one page to another is working r not using QTP for web based application
Hi How to retrieve data from web element line by line?
What issues come up in test automation, and how do you manage them?
How to find if given number is prime or not
what is the exact testing process in qtp plz explin ?
how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page
I want to know can we integrate visual source safe tool with QTP and QC for our version controlling process? WE know QTP and QC 10.0 version is having the version control inbuilt in it but I want to know the merits and demerits of the inbuilt version control tool and the visual source safe tool using QTP and QC.
What are the types of Object Repository’s in QTP?
What is the difference between Global and Local Data Sheets?
What are main panes available in qtp test browser?
What are the limitations in using Virtual objects?
Differences between QTP & Winrunner?