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.
Configuring Sahi for Eclipse
Hi folks,
I have added a new blog post showing how Eclipse can be configured to give content-assist and syntax highlighting for Sahi projects. http://blog.sahi.co.in/2009/06/configuring-eclipse-for-sahi.html.
DO REMEMBER to copy apis.sah into the "scripts" folder as specified in the post.
Let me know if you find this useful.
Regards,
Narayan
I have added a new blog post showing how Eclipse can be configured to give content-assist and syntax highlighting for Sahi projects. http://blog.sahi.co.in/2009/06/configuring-eclipse-for-sahi.html.
DO REMEMBER to copy apis.sah into the "scripts" folder as specified in the post.
Let me know if you find this useful.
Regards,
Narayan
Comments
I tried the integration and it really rocks. This integration will definitely save hours of time while writing Sahi script.
Thanks a lot for the video
Cheers
dp
When i open the site the vedio is not available.
Can you please help me so that i can use Eclipse with Sahi.
Thanks in advance.
Is it possible to record and replay scripts from eclipse?
Thanks in advance.
What Narayan has posted is a way to configure Eclipse to edit Sahi scripts with syntax highlighting and code auto-complete support. Thanks a ton to Narayan for his efforts.
Since Eclipse is a very powerful IDE, it is actually possible to do record and play back Sahi scripts from within Eclipse, by using the built-in browser of Eclipse
What I did is:
1. Configured Eclipse as described by Narayan for syntax highlighting support
2. Open the project in Eclipse
3. Select Window->Show View->Other... (This brings up the Show View window)
4. Select General->Internal Web Browser
5. Launch your url and bring up Sahi controller by using the hot keys
6. Record scripts using Sahi controller
7. Once you stop recording, do a refresh of the Project Explorer in Eclipse and you will see the new script there
8. Edit it using Eclipse editor, run it from Sahi controller
I tested with a sample site and it works very well
Btw, you can start the proxy from eclipse by:
1) Run -> External Tools -> External Tools Configurations
2) Click on Program, and then the "new" button on top.
3) Fill these details:
Name: Start Sahi
Location:
Working directory:
Apply and Close
4) Go to Run -> External Tools again and you should see "Start Sahi" there.
5) Click to Start Sahi from inside eclipse. The output will be visible in the console at the borrom and you can click the red button to stop Sahi.
I'm using also this integration it's very useful however hyperlinking in eclipse is not working for me,
should i configure something in eclipse or maybe made something wrong?
Any help appreciated.
I have gone through the video its really nice and to working with eclipse editor is always better then normal, i have configured the same accroding to the steps given in your video, but i am facing 2 issues here:
1) While all configurations done there are javascript errors displayed. like (Description Resource Path Location Type Syntax error on token "/", delete this token set_included.sah /Sahi_Scripts/demo line 19 JavaScript Problem), probably I am doing something wrong with Javascript.
2) while i am opening confirm.sah and type _click() there is no any pop up open contains all function given in video.
I have copied your given apis.sah to script folder also.
Please guide me its urgent for me!!
Thanks
Chetan!
//<browser>
and
//</browser>
instead of
<browser>
</browser>
So that some of those errors go away.
I must say that I have also faced weird problems with JSDT. The autocomplete is visible sometimes and not visible sometimes. If you have just created the project, close it, and open again. You may get the dropdowns.
Regards,
Narayan
I have manually replace the
<browser></browser> to //<browser> //</browser>. and no errors now, but now i have some javascript warnings exists, its normal semicolon warnings which is almost in all files where semicolon is missing.
Do i need to enter semicolon manually ? or any way we can overcome this all warning.
I just wanted to make sure that i am driving in right path.
Thanks
Chetan!
I have configured Sahi with Eclipse its really nice and easy, thanks a lot!
I have little bit confusion here i am doing the following things:
1) My sahi is running in eclipse
2) my code (.sah) file is opened in eclipse.
3) As per comment of DP i have opened external browser alson in eclipse.
Is it any way to record and run script with eclipse???
I have read the DP comment but doesn't get properly.
Could you please help me!
Thanks
Chetan!
I can't seem to open the controller, although the console and everything should be set up correctly.
I followed everybody's directions, but can't get the controller up by ctrl+alt/dbl click
Who can help me?!
Thanx
Is this related to running Sahi via Eclipse or you are unable to get this working even for stand alone Sahi?
Regards,
Narayan
Is there any hot keys to invoke autocomplete/ dropdowns ?
Is there any documentation file avilable for the same apart from this video??
Some Configuration step written with some snap shots?
I installed Eclipse Java EE IDE for Web Developers in Windows 7 Ultimate and followed the steps in your video. However, I couldn't find the menu item "JavaScript Support" from the popup menu triggered by right-clicking the project created for Sahi scripts. Do you know how to fix this?
I am a newbie to Sahi. I am having prob in integration with Eclipse. I have Eclipse 3.4.2(Ganemade). After doing all the mentioned steps I am getting below errors. Seems it's unable to resolve the link to lib. Mostly giving "Function xyz() is undefined". Please help on this. If I am using another version of Eclipse I am facing the same issue as mentioned above by NaomicC.
The operator == is undefined for the argument type(s) void, String find_in_google.sah HelloSahi/demo line 5 JavaScript Problem
The local variable $topic2 may not have been initialized extjs1.sah HelloSahi/demo line 11 JavaScript Problem
The function xparseInt(String) is undefined log_exception_as_failure.sah HelloSahi/demo/shouldfail line 3 JavaScript Problem
The function toLowerCase() is undefined spandiv.sah HelloSahi/demo line 16 JavaScript Problem
The function toJSON(RegExp) is undefined for the type Function libTest.sah HelloSahi/demo line 36 JavaScript Problem
The function split(String) is undefined readfile.sah HelloSahi/demo line 5 JavaScript Problem
The function sortBy(String) is undefined table_2darray.sah HelloSahi/demo line 132 JavaScript Problem
The function slice(Number) is undefined table_2darray.sah HelloSahi/demo line 92 JavaScript Problem
The function replace(RegExp, String) is undefined fileUpload.sah HelloSahi/demo line 22 JavaScript Problem
The function print(Error) is undefined for the type Function testuff.sah HelloSahi/demo line 45 JavaScript Problem
The function print(any) is undefined for the type Function integration.sah HelloSahi/demo line 24 JavaScript Problem
The function maxCycles(Number) is undefined for the type Function delayedLoad.sah HelloSahi/demo line 1 JavaScript Problem
The function match(RegExp) is undefined keypress.sah HelloSahi/demo line 24 JavaScript Problem
The function keyRelease(any) is undefined clickNative.sah HelloSahi/demo line 55 JavaScript Problem
I am using Eclipse Indigo version.
1. My sahi scripts is open in eclipse
2. i started proxy in eclipse , output will be visible in the console at the bottom
3. Launched the url using General->Internal Web Browser
Now Can anybody share me the detail steps to bringup sahi controller to modify my existing scripts. Also steps to execute sahi scripts inside eclipse.
I am a newbie to Sahi.
I am having the same prob in integration with Eclipse as NaomicC and neovivek
Need ur help
i have gone through the video, in video after adding project we got some other files like
1. demo --> folder
2. .project file and some other files like .sah files
i couldn't get these files after project created
and
when we right click on project and select "web development tools" option also i couldn't find
pls let me know how to resolve these issues
thanks in advance
Have done this, but next how does one bring up the controller of sahi and then actually record and play scripts with simultaneous refresh of the script in the eclipse project?
Yours directions will be highly appreciated.
Thnx
Anirudh
still same error despite i have followed all the steps
i have gone through the video, in video after adding project we got some other files like
1. demo --> folder
2. .project file and some other files like .sah files
i couldn't get these files after project created
and
when we right click on project and select "web development tools" option also i couldn't find
(For windows: eclipse-jee-ganymede-SR2-win32.zip). This is downloadable from http://www.eclipse.org/downloads/
in the download location im unable to find ( eclipse-jee-ganymede-SR2-win32.zip ) this file, im using eclipse-jee-indigo-SR1-win32, is it not compatible with this version ?
its very urgen, plsssssssssssssssss let me know how to resolve these issues
thanks in advance
I have gone through the video its really nice, i have configured the same accroding to the steps given in your video, but i am its giving lot of error and warning:
I have copied your given apis.sah to script folder also.
Please guide me as am starter to this tool!!
Thanks
Murali
Launched the url using General->Internal Web Browser but I am not getting what to do with that. Please tell what to next.
Thanks