06-18-2012, 11:56 AM
Hi All,
I have to iterate the following code.
that is i have to click a each time, then a new frame will be created with same fields in the old frame. so the object name of new ly created fileds will be like
instead of
so in iteration how can i change the Name if the Object.That is i need Syntax for giving variable in object name.
I have to iterate the following code.
Code:
Browser("Browser").Page("User").Frame("actionIFrame").WebButton("WebButton_2").Click
Wait(3)
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$").Set BusinessName
wait(2)
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_2").Set EmpCount
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_3").Set VolNumber
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_4").Set LegStrctr
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_5").Set BAddLine1
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_6").Set BAddLine2
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_7").Set BStreetName
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_8").Set BCityID
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_9").Set BCityName
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_10").Set BStateName
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_11").Set BCountryCd
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_12").Set PostalCd
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_13").Set BAddType
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_14").Set BWorkNumber
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_15").Set BHomeNumber
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_16").Set BCellNumber
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_17").Set BEmail1
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$l1$_18").Set BEmail2
wait(1)
Browser("Browser").Page("User").Frame("actionIFrame").WebButton("WebButton_3").Click
Wait(3)
Browser("Browser").Page("User").Frame("actionIFrame").WebList("$PpyWorkPage$pBusinessList$l1$").Select 1
that is i have to click a
Code:
button([color=#FF0000]Browser("Browser").Page("User").Frame("actionIFrame").WebButton("WebButton_2").Click[/color])
Code:
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$[b]l2[/b]$").Set BusinessName
instead of
Code:
Browser("Browser").Page("User").Frame("actionIFrame").WebEdit("$PpyWorkPage$pBusinessList$[b]l1[/b]$").Set BusinessName.
so in iteration how can i change the Name if the Object.That is i need Syntax for giving variable in object name.