0

I am new to Gauge. I am trying to loop through csv file and save the data on a website. Can any one guide through how to manipulate the table object.

Spec

* dt <table:D:/work/2019/gauge-app/specs/data.csv>

Step Impl (JS)

step("dt <data>", async (data) => {
var row;


for(var i=0;i<data.length;i++){
    row=data[i];
    await write(row[0].toString(),into(textField({id:"name"})));
    await write(row[1],into(inputField({id:"roll"})));
    await waitFor(2000);
    await press("Enter");

}

});

Vasco
  • 782
  • 1
  • 5
  • 22

1 Answers1

1

I got it working with this.

table:D:/work/2019/gauge-app/specs/data.csv
##add members
* write <name> into "principal_search"
* check "membership[user_ids][]"
* check "membership[role_ids][]" value <role>
* click button "commit"
Vasco
  • 782
  • 1
  • 5
  • 22