how to pass commas in test dat

Ask general questions here.
Posts: 7
Joined: Thu Aug 27, 2015 2:25 pm

how to pass commas in test dat

Post by Shahnaz » Thu Jan 21, 2016 11:40 am

I am using CSV connector for getting test data from my csv sheet.
I want to pass commas in my test data. For eg: "Select firstname,Lastname,userid from Table" in csv file
It is looking fine in csv file, but in ranorex data sources it is splitting the string as
Select firstname Lastname Userid from Table

Cant we have any text qualifier in ranorex as we have in excel and openoffice for passing commas in test data.
Thanks in advance

User avatar
Ranorex Guru
Ranorex Guru
Posts: 6541
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: how to pass commas in test dat

Post by odklizec » Thu Jan 21, 2016 1:02 pm


CSV stand for comma-separated values. So if there is "," (comma) defined between two strings, it's always used as a value separator. If you would open such CSV file in Excel, it will also separate these values into individual columns, containing "Select firstname" "Lastname" and "userid from Table" values.

If I understand you right, you want entire string in single column and not separated in three individual columns??
So the solution is to enclose entire string in double quotes, like this:
"Select firstname,Lastname,userid from Table"
And this is how it should look, if you want CSV with multiple columns:
"Select firstname,Lastname,userid from Table", column2, column3, "column4,column4-1"
Where Ranorex should split the file into 4 separate columns. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration