02-01-2010, 11:09 AM
Hi,
I am using the following code.
As there are so many edit boxes, i am filtering it.
But the problem is when it adds new edit boxes, the name of the edit box changes
1st edit box name:sourceName_0
2nd edit box name:sourceName_1
and so on...
if i trim by name, i am able to set the value in only 1 edit box.
i want to set different values in the different edit boxes which populate after clicking add button.
Any help would be really appreciated.
Regards;
vijay
I am using the following code.
As there are so many edit boxes, i am filtering it.
Code:
Browser("micclass:=browser").page("micclass:=page").WebEdit("name:=sourceMoreRows").Set 1------>acts as switch
var= Browser("micclass:=browser").page("micclass:=page").WebEdit("name:=sourceMoreRows").GetROProperty("value")
Browser("micclass:=browser").page("micclass:=page").WebButton("Name:=More Sources").Click
Set WbEdit = Description.Create()
WbEdit("micclass").Value = "WebEdit"
WbEdit("html id").Value = sourceName_0
Set AllWbEdit = Browser("micclass:=browser").Page("micclass:=Page").ChildObjects(WbEdit)
NumberOfEdits=AllWbButton.Count
msgbox(NumberOfEdits)
For( i = 0 ,i<=var,i++)
WBname = AllWbEdit(i).GetROProperty("html id")
msgbox(WBname)
If trim(WBname) = trim(sourceName_0) Then
AllWbEdit(i).Set "Test"
End If
Next
1st edit box name:sourceName_0
2nd edit box name:sourceName_1
and so on...
if i trim by name, i am able to set the value in only 1 edit box.
i want to set different values in the different edit boxes which populate after clicking add button.
Any help would be really appreciated.
Regards;
vijay