Hello,
I am new to automated testing, and am stuck on the test reading the next line in my CSV file. The file has two fields, one a vendor number, the next an email address.
The test picks up the vendor number, will search for it, goes to where I want the email address added, adds it, saves it, then loops through again, but is not picking up line 2, but picking up line 1 again.
The file lay out is
vendor1,vendor1email
vendor2,vendor2emal
vendor3,vendor3email
The source view for my test is
{
"Name": "Update_no_email_add",
"CreationDate": "2022-8-18",
"Commands": [
{
"Command": "store",
"Target": "slow",
"Value": "!replayspeed",
"Description": ""
},
{
"Command": "store",
"Target": "88",
"Value": "loop",
"Description": ""
},
{
"Command": "store",
"Target": "1",
"Value": "i",
"Description": ""
},
{
"Command": "store",
"Target": "${i}",
"Value": "",
"Description": ""
},
{
"Command": "while_v2",
"Target": "${i} <= ${loop}",
"Value": "",
"Description": ""
},
{
"Command": "open",
"Target": "Web link to system to update",
"Value": "",
"Description": ""
},
{
"Command": "selectFrame",
"Target": "id=ptifrmtgtframe",
"Value": "",
"Description": ""
},
{
"Command": "type",
"Target": "id=#ICCorrectHistory",
"Value": "Y",
"Description": ""
},
{
"Command": "click",
"Target": "id=#ICCorrectHistory",
"Value": "",
"Description": ""
},
{
"Command": "csvRead",
"Target": "VendorList.csv",
"Value": "",
"Description": ""
},
{
"Command": "type",
"Target": "id=VENDOR_AP_VW_VENDOR_ID",
"Value": "${!COL1}",
"Description": ""
},
{
"Command": "click",
"Target": "id=#ICSearch",
"Value": "",
"Description": ""
},
{
"Command": "click",
"Target": "link=Address",
"Value": "",
"Description": ""
},
{
"Command": "type",
"Target": "id=VENDOR_ADDR_EMAILID$0",
"Value": "${!COL2}",
"Description": ""
},
{
"Command": "click",
"Target": "id=#ICSave",
"Value": "",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return Number (${i}) + 1;",
"Value": "i",
"Description": ""
},
{
"Command": "end",
"Target": "",
"Value": "",
"Description": ""
}
]
}
How do I get “${!COL1}” and “${!COL2}” to return the data from my CSV from each row with each pass?
Thanks,
Andrew.