Active TopicsActive Topics  Display List of Forum MembersMemberlist  CalendarCalendar  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin


 One Stop Testing ForumTesting Tools @ OneStopTestingQuickTest Pro @ OneStopTesting

Message Icon Topic: Childobjects function for WebEdit

Post Reply Post New Topic
Author Message
laboni
Newbie
Newbie
Avatar

Joined: 25Apr2007
Online Status: Offline
Posts: 1
Quote laboni Replybullet Topic: Childobjects function for WebEdit
    Posted: 25Apr2007 at 4:43am
Hello,

I have the following function using childobjects to enter text in an edit box. However, when executed I get an error on the oChildren(intCounter).Set "something" line stating that the object does not support the property or method .Set.

What am I doing wrong?


Code:
Function EditEnterText(strObjectName, strText)
Dim oDesc, oChildren, intCounter, strType
Set oDesc = Description.Create
oDesc("micClass").value = "WebEdit"
Set oChildren=Browser("micClass:=Browser").Page("micClass:=Page").ChildObjects(oDesc(0))
For intCounter = 0 To oChildren.Count - 1
strType = oChildren(intCounter).GetROProperty("name")
If strType = strObjectName Then
MsgBox intCounter
'oChildren(intCounter).Select
oChildren(intCounter).Set "something"
End If
Next
End function



Post Resume: Click here to Upload your Resume & Apply for Jobs

IP IP Logged
anjan
Newbie
Newbie
Avatar

Joined: 25Apr2007
Online Status: Offline
Posts: 1
Quote anjan Replybullet Posted: 25Apr2007 at 5:24am
Set oChildren=Browser("micClass:=Browser").Page("micClass:=Page").ChildObjects(oDesc)

Try this:

Function EditEnterText(strObjectName, strText)
Dim oDesc, oChildren, intCounter
Set oDesc = Description.Create
oDesc("micClass").value = "WebEdit"
Set oChildren=Browser("micClass:=Browser").Page("micClass:=Page").ChildObjects(oDesc)
For intCounter = 0 To oChildren.Count - 1
If strObjectName =oChildren(intCounter).GetROProperty("name") Then
oChildren(intCounter).Set strText
Exit For
End If
Next
End function

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 5.063 seconds.
Vyom is an ISO 9001:2000 Certified Organization

© Vyom Technosoft Pvt. Ltd. All Rights Reserved.

Privacy Policy | Terms and Conditions
Job Interview Questions | Placement Papers | Free SMS | Freshers Jobs | MBA Forum | Learn SAP | Web Hosting