Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help me understand the mentioned vb script
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Dear friends ,

Please explain the part of the script in Bold.

Code:
Const constBaseWebEditIndex = 9

Dim intIndex,vectPartNumber

vectPartNumber = Split( DataTable( "Part_Number", "MR_Creation" ), "," )

For intIndex = 0 To UBound( vectPartNumber )
    Browser("Browser").Page("HUB").WebButton("Add").Click
    Wait(4)

    Browser("Browser").Page("HUB").[b]WebEdit("name:=WebEdit",    "Index:=" & constBaseWebEditIndex + intIndex*3 )[/b].Set        Trim( vectPartNumber( intIndex ) )

Next
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,
This is Descriptive Programming, but you mentioned, name:=WebEdit, which is not right,
WebEdit is ClasssName or Native Class and other is Index,
You trying to use 2 properties to identify the object without OR.
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Karthik -
There is no vbscript in the question you have asked. As ramesh pointed out you are dealing with a Descriptive programming instead of using a Object from the Object Repository.From the code i understand that you are trying to set a value in a particular webedit on the page whose index matches "IntIndex*3" value. This is a good approach when you have multiple objects and you want to work on one of them. Instead of adding all the objects on to the Object Repository it is handy to use this approach.

Let me know if this helps.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)