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.

webrunner feature and interactive data input

aragavanaragavan Members
edited January 2013 in Sahi Pro
I have been using the trial version of Sahi Pro and I find it very reliable.

I have a specific requirement, it would be great if you could answer my query.

I would like to use Sahi for creating a light weight automation to be used by higher management/business users.

But the problem is, the automation will do online booking using credit cards so who ever runs it will use their own cards so they have to enter it just before they run it.

i looked at your 'web runner' and 'excel framework' and i know this will meet my requirement to some extent, but to be truly light-weight, i wanted to use only the web-runner feature so no one need to install anything.

But is it possible to giver user input and run it via web-runner as well ?

Answers

  • Hi,

    If you look at the Sahi Webrunner in Sahi Pro 4.5.1 (click the link "(Web)" on dashboard to open it), there is an option to add extra parameters. These will be availbale to the script during playback through _suiteInfo() api. Let us look at the following script:

    _navigateTo("http://sahi.co.in/demo/training/";);
    var $suiteInfo = _suiteInfo();
    _maskLogs("Password Information start"); //will mask the logs
    _setValue(_textbox("user"), $suiteInfo["user"]);
    _setValue(_password("password"), $suiteInfo["pass"]);
    _unmaskLogs("Password Information end");
    _click(_submit("Login"));
    _click(_button("Logout"));

    The extra parameters passed for this script was: &user=test&pass=secret

    Now this will mask the two steps with value of username and password in the logs, but since these variables are present in _suiteInfo(), it can be seen in suiteinfo of the logs. To mask it from there also, we need to use a variable naming convention as follows:
    Variable name must start with mask_

    So in the above script, we make the change in name of variables to mask the information from suiteinfo as well and the script becomes:

    _navigateTo("http://sahi.co.in/demo/training/";);
    var $suiteInfo = _suiteInfo();
    _maskLogs("Password Information start");
    _setValue(_textbox("user"), $suiteInfo["mask_user"]);
    _setValue(_password("password"), $suiteInfo["mask_pass"]);
    _unmaskLogs("Password Information end");
    _click(_submit("Login"));
    _click(_button("Logout"));

    The extra parameter passed to this script was: &mask_user=test&mask_pass=secret


    In this way you can mask you private information.

    Note: If the controller is opened during playback, this information will be available. However, when you launch a test through webrunner, controller will not be opened by default.

    Thanks,
  • aditiaditi Members
    Can you please tell me does sahi supports web runner if so how can we use it please provide some document or information about it.
    Thanks in advance :)
  • Hi Aditi,

    Sahi supports web runner.

    Document will be soon released on site.

    Regards,
    Pratik Shah
  • Hi

    Here is the documentation for sahi webrunner

    http://v2techlabs.com/sahi-web-automation-testing/sahi-webrunner/

    Regards,
    Pratik Shah
Sign In or Register to comment.