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.

error in running test script from excel sheet

madhurakanemadhurakane Members
edited November -1 in Sahi - Open Source
Hi ,

I am new to Sahi and I am facing a problem while trying to run scripts from excel sheets.
I have sahi pro 3.6 ,build 21/7/2011 and I am running it in Mozilla 5.0. My system is Windows 7 ,32 bit and I have Java 1.6 and Tomcat server.

Now the issue: I have an excel sheet which I have exported to csv,with test cases written .I have added 2 columns Script and Tags where I am writing the script name and tag respectively, for a testcase.
I Go to Bin on sahi and run it as:
testrunner sampletestfile.csv (url) firefox "test"

When I run it, it gives an apache tomcat error "the requested resource is not available" and Failure on the sahi cmd. when I go to the logs and check it says that the script does not exist. But I have placed my sahi script (.sah) and the csv file(from where I call this script) in the Sahi/userdata/scripts folder.
I am not understanding where I am going wrong. Why is Sahi unable to find the test script?


Thank you in advance,

Madhura Kane
Acellere software

Comments

  • Hi Madhura,

    It seems like you are working with an excel framework. Its not possible to run the csv file if you are trying to do an excel framework.

    Could you please let me know which OS are you working on?

    Also, have a look at http://sahi.co.in/w/file_download/3/Sahi.pdf.

    Regards
    Sumitra
  • My OS is Windows 7.

    Sorry I did not get you when you said it is not possible to run csv file?
    I have done it according to how it has been explained in your 'sahi introduction to web automation' webinar. It says tat excel file need to be converted to .csv in order to run it as :

    testrunner sampletestfile.csv (url) firefox "test"

    I read the sahi pro user manual, in that a method different than the one expplained in the webinar is given. So is it not possible to run a csv file thru testrunner anymore?
  • Hi Madhura,

    If you want to work with csv file then you must be using _readCSVFile(filePath, wordSeparator) and _writeCSVFile(filePath, wordSeparator).

    Here you can find the details about these API's

    http://sahi.co.in/w/all-apis

    Regards
    Sumitra
  • Hi sumitra,

    I am using excel framework & I have written simple login and logout functions for test purposes. my excel is as below:

    TestCase KeyWord Argument1 Argument2
    loadSahi "testLogin1.sah"
    testcase one login "testuser" "superuser"
    logout

    my testLogin1.sah contains:
    function login($username, $password)
    {
    _setValue(_textbox("username"), $username);
    _ setValue(_password("password"), $password);
    _click(_submit("Login"));
    }

    function logout()
    {
    _click(_span("Logout"));
    }

    But when I playback from sahi controller , it gives : Stopped Playback: FAILURE. Wen i go to the logs and check it says : missing ; before statement

    What does this mean? I am not able to understand. I verified my excel and code with the one's given in scripts/demo but i don't see the problem

    Please help.
  • hi sumitra,

    Can u give me some clue as to what is going wrong?
    Please help!


    Madhura Kane
    Acellere Software
Sign In or Register to comment.