18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

_readCSVFile having issues with line breaks

jkbjkb Members
edited February 2013 in Sahi Pro
I recently updated my testing to output error messages to a CSV file using _writeCSVFile and some of the errors have multiple lines (specifically those coming from _lastAlert()). I've found that the error message will write to the file correctly, but if I ever read from the file and re-write, the text gets broken across multiple cells.

1st Write:

Row1
Col1: scriptname
Col2: screen
Col3: action
Col4: "Value cannot be
null. DeviceID."

2nd write:

Row1
Col1: scriptname
Col2: screen
Col3: action
Col4: Value cannot be

Row2
Col1: "null. DeviceID.
scriptname"
Col2: screen
Col3: action
Col4: Error has occurred.

The 2nd line of Row1/Col4 gets re-written as part of Row2/Col1.

Any thoughts?

Answers

  • jkbjkb Members
    I figured out that if the column with the line breaks isn't the last column then it will do okay. For now I've added an extra column at the end to avoid issues. Needs a fix, though.
Sign In or Register to comment.