I need to verify two csv file in the same test case Please help

I need something like this
I have stores that all are saved in input.csv file then pick one by one store name from the input.csv and check full file output.csv contain the same name or not. If output.csv doesn’t contain the store name then do nothing otherwise I register that user and saved in output.csv file

This is the scenario can you please help me

It’s simple you can switch in every csv you want with command csvread

Ui vision support multi csv switch.

Read here

https://ui.vision/rpa/docs/selenium-ide/csvread

Is there any chance that you could post a code example? It really helps with answering and fully understanding questions.

However, you could always store the findings from one CSV then load and check it agents the stored value.

For help storing data inside the store command see:

Yes I checked that one but it is not working

{
“Name”: “Verifyoutputcsv”,
“CreationDate”: “2020-3-2”,
“Commands”: [
{
“Command”: “run”,
“Target”: “Pickusername”,
“Value”: “”
},
{
“Command”: “echo”,
“Target”: “user = {!COL1}", "Value": "" }, { "Command": "store", "Tarhget": "true", "Value": "!statusOK" }, { "Command": "verifyElementPresent", "Target" : "//div[@id='PolarisTextField2Error']", "Value" : "" }, { "Command": "if_v2", "Target": "{!statusOK} == false", "Value": "" }, { "Command": "store", "Target": "{erroruser}”,
“Value”: “!csvLine”
}

]

}

1 Like

Merge all csv in one csv is more simple and fast way

What newuserkantu said is probably the best thing to do.

However I have also created this macro that works for me:

{
  "Name": "CSV Compare",
  "CreationDate": "2020-3-11",
  "Commands": [
    {
      "Command": "csvRead",
      "Target": "csv1.csv",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "${!COL1}",
      "Value": "Value1"
    },
    {
      "Command": "csvRead",
      "Target": "csv2.csv",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "${!COL1}",
      "Value": "Value2"
    },
    {
      "Command": "if_v2",
      "Target": "${Value1} == ${Value2}",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "Same",
      "Value": "Green"
    },
    {
      "Command": "else",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "Different",
      "Value": "Red"
    },
    {
      "Command": "end",
      "Target": "",
      "Value": ""
    }
  ]
}

As an aside, your code didn’t go into Kantu very well, If you want to copy your whole code from inside of Kantu, you can click the Source View (JASON) tab in your script to show you the whole code. (also not necessary if you highlight your code and click the </> button in the forum editor you can state that your code is code).