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 is the difference between DATA TABLE and DATA SET?
Inserting a Call to Action is not Importing all columns in Datatable of globalsheet. Why?
What is Parameterizing Tests?
HI, Based On The Information Below Write A Data Driven test Script Edit Box 1 Should take Value From Num1 Column Edit Box 2 Should take Value From Num2 Column Click On Add Button, Get The Value Of Exp res Column, Get Value From Actual Result Edit Box , Compare Two Values, Write Pass / Fail Value Into Result Column Thanks In Advance... Kavitha Input.Xls Num1 Num2 Exp res Act res Result 10 30 40 40 Pass 50 40 90 90.5 - - - - - - - - - - - - - - - -
Explain the checkpoint in qtp?
How can we export test results to an excel sheet in QTP??? Can any one provide sample coding for this?????
how to get font size of a "WebEdit"
I have to automate excel features using qtp in this i need to open instance of excel in different ways like double click on file, drag & drop options, File > open option but i know the 2 ways to open the excel instance 1 is by creating the object and another is to open the excel file in already opened instance of excel through sendkeys through qtp. But i m not geting how to open excel file through double click and drag and drop option through qtp script plz help me out anyone can thanks in advance
QTP WAS WORKING FINE BUT TODAY I GOT THE ERROR , THE MEMORY COULD NOT BE READ -REFERENCE MEMORY ,pPLEASE REPLY URGENT WHAT IS THE SOLUTON
what are the disadvantages in QTP 9.2?
what is life cycle of automation testing ?
How to check the value for variables during run time. Pls anybody can give the answer.. Thanks in advance...