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.

get values from several cells and place onto one row in excel sheet

KMANDOKMANDO Members
edited December 2008 in Sahi - Open Source
Hi,

I am trying to get some text from different cells on a webpage then record these values into a spreadsheet within one row, not having any luck as of yet.

as the following provides the values to be extracted and places them into xls file but each value will be on a seperate row.
example:

_debugToFile(_getText(_cell(_table(0), 1, 2)), "C:\\textfile2.xls");
_debugToFile(_getText(_cell(_table(0), 2, 2)), "C:\\textfile2.xls");


What I am trying to do is pace both of the values into one row, but two different columns, I tried the following but no luck with it:

_debugToFile(_getText(_cell(_table(0), 1, 2))++(_cell(_table(0), 2, 1))), "C:\\text.xls");



any help would be appreciated :)

Comments

  • narayannarayan Administrators
    Use
    _debugToFile(_getText(_cell(_table(0), 1, 2))+ ',' +(_cell(_table(0), 2, 1))), "C:\\text.xls");
    
    Sahi is similar to javascript. Use javascript syntax when in doubt.
Sign In or Register to comment.