18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
Irregular Recording of steps
Hi,
We have seen this since sometime that while recording the scripts with sahi the steps are not in order and also the steps gets repeated sometimes. In case while modifying the script if we miss out to remove the extra repeated step or if any line of code is not in order(EX: like the sumit button is prior to entering the username) then our script fails. But since this is a trivial one, we were not much affected with this issue.
But just wanted to know if only we face this kind of problem or is there any other thing with SAHI.
Regards,
Bhavitha
We have seen this since sometime that while recording the scripts with sahi the steps are not in order and also the steps gets repeated sometimes. In case while modifying the script if we miss out to remove the extra repeated step or if any line of code is not in order(EX: like the sumit button is prior to entering the username) then our script fails. But since this is a trivial one, we were not much affected with this issue.
But just wanted to know if only we face this kind of problem or is there any other thing with SAHI.
Regards,
Bhavitha
Comments
Bhavitha
in some cases I face the same problems, when the log says missing semicolon or unterminated string literal, the line of code refereed to might be a totally different file (well, it's included, so its not totally far away).
I got a piece of code, which always executes 5 times, i can share it if this would be helpful.
Missing statements happened, when when i do something like this
Regards
Wormi
You are right, even i face the same problem.
But what is the reason for it, is it sahi problem
Also why does the redorded steps are not in order, and also when we click assert from controller, the steps actually gets repeated.
What version of Sahi and which browser are you using ?
Also, is that you are facing this issue with all the browsers?
Can you post the URL and the scripts?
Regards
Sumitra
We record & playback on IE 7 browser and Sah is V3- Build : 2010-11-03
We dont record on other browsers, but only on IE and once modified the scripts we play back on other browsers.
here is just an example for the steps recorded being not in order:
1. _click(_checkbox("id1[0].isFlag"));
2. _setValue(_textbox("alias"), "trade");
3. _click(_submit("Search"));
4. _click(_checkbox("selectedIds"));
5. _click(_button("Select"));
6. _click(_image("Lens.gif")); --> Here this clicking of lens image in the scripts is placed at 6th line which is wrong . Instead it must be in the 2nd line before _setValue
This is one of the example... We sometimes face this problem in many other places as well.
And for the second issue: if the log says syntax error or missing semicolon, and if we click on the log it does not takes us to exact line of script where there is error... so we need to scan the entire script to find out this error.
Regards,
Bhavitha
Kindly post the URL?
Regards
Sumitra
What URL you are asking for? You mean our application URL... i wont be able to post it...
1) Does
_click(_image("Lens.gif"));
open a new window or popup? The behavior you report can happen when you are using showModalDialog() to open a modal dialog or popup.
Currently you will have to copy the click which invokes the modalDialog and move it before the correct steps.
2) When you miss out something like a closing brace (}), the javascript interpreter will go on till it actually faces a problem. This may or may not be near the place of the real error. I would suggest that your team does small incremental changes, check if things are working at frequent intervals, so that it is easier to step back and fix the problem.
Regards,
Narayan
You are right, it opens up a pop-up.
And ya we are verifying the steps in script before we actually playback.
Thanks for the reply Narayan, we got the point about javascript interpreter.
Regards,
Bhavitha