In my Datatable three rows are present. After clicking on Add button new row is and I need to put input values from datatable.

Problem: How to field of each row dynamically for inserting values?

Script:

 Datatable.GetSheet(5)
    rowcount=Datatable.GetRowCount
    For i=1 to rowcount
         Datatable.SetCurrentRow(i)
         lenth =Datatable.Value(1,5)
         width= Datatable.Value(2,5)
         height= Datatable.Value(3,5)
         weight=Datatable.Value(4,5)
         piece=Datatable.Value(5,5)
Browser("Magma MCR").Page("Magma MCR").WebEdit("ship_info1[length_val]"Set lenth 
Browser("Magma MCR").Page("Magma MCR").WebEdit("ship_info1[width_val]").Set width 
Browser("Magma MCR").Page("Magma MCR").WebEdit("ship_info1[height_val]").Set height 
Browser("Magma MCR").Page("Magma MCR").WebEdit("ship_info1[weight_val]").Set weight 
Browser("Magma MCR").Page("Magma MCR").WebEdit("ship_info1[total_pieces]").Set piece

In this script,

Here in first row, web name is "ship_info1[height_val]

for next added row, web element gets chnaged to "ship_info2[height_val]"

So, I want to select this web-element dynamically. Please see the attached image.
enter image description here



Source link https://sqa.stackexchange.com/questions/15719/in--12-51-how-to-identify--element-generated-using-ajax-jquery-

LEAVE A REPLY

Please enter your comment!
Please enter your name here