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.

Parser problem

globalwormingglobalworming Moderators
edited November -1 in Sahi - Open Source
Hi

i wanted to try a different coding style for my tests, but unfortunately it doesn't work. This piece of code works well in the controller
var Webshop = {
    startURL : "fefefe",
};
Webshop.init = function() {
  _log("asd");
  _alert(this.startURL);
};
Webshop.init();
but the playback wont work. The parsed script looks kinda weird
var Webshop = {
startURL:"fefefe",
};
Webshop.init = function() {
_sahi.schedule("_sahi._log(\"asd\");", "/home/wormi/workspace/sahi_projects/mt/platform.sah&n=6");
  _sahi._alert(Webshop.startURL);
};
Webshop.init();

Is there a way to work around this?

Regards
Wormi



Sahi Build: 2011-07-19 on Chromium-Browser
Linux 2.6.38-10-generic

Comments

  • narayannarayan Administrators
    Hi globalworming,

    Yes this is a current bug which will be fixed in one of the coming releases.

    An ugly workaround, is to use

    var $url = this.startURL;
    _alert($url);

    Regards,
    Narayan
  • Thanks, I'll try it.
  • globalwormingglobalworming Moderators
    edited September 2011
    ok, it works, thanks Narayan, so some experimenting will be possible :)
    looking forward for the bugfix and a matched behavior of the playback and the recorders test field
Sign In or Register to comment.