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.

Line continuation

DanMcNameeDanMcNamee Members
edited November -1 in Sahi - Open Source
I'm trying to clean up some Sahi (.sah) script files to make them more readable and many lines are extremely long (mostly SQL statements) that I would like to break up into multiple lines so that they don't extend past the right edge of the screen.

Does Sahi allow lines in a script to be broken up into multiple lines? If so, what is the line continuation character? Using nothing produces an error. Using + produces an error. Using \ produces an error. Everything I have tried produces an error.

Thanks!

Dan

Comments

  • narayannarayan Administrators
    Use javascript syntax for string concatenation.
    var $id = 100;
    var $sql = "select * from " + 
                "people where " + 
                "personId = " + $id;
    _alert($sql);
    

    Regards,
    Narayan
  • narayan wrote:
    Use javascript syntax for string concatenation.
    var $id = 100;
    var $sql = "select * from " + 
                "people where " + 
                "personId = " + $id;
    _alert($sql);
    

    Regards,
    Narayan

    Narayan,

    Thanks! I tried that first, but I got errors. I'll give it a try again.

    Dan
  • It's working now. Not sure why it didn't before. Strange.

    Dan
This discussion has been closed.