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.

configure sahi in eclipse

JithinJithin Members
edited November -1 in Sahi - Open Source
I configured Sahi in eclipse by following the steps

1) Checkout Sahi code from SVN from (https..//sahi.svn.sourceforge.net/svnroo … ontroller2)

2) In Eclipse, do File -> Import -> Existing Projects into Workspace -> Next -> Select the above checked out directory as root directory. Project should now be imported.

3) Right click build.xml -> Run As -> Ant Build. This will either work or fail.

( it fails)

4) Right click build.xml -> Run As -> External Tools Configurations ... -> Environment tab. Add new environment variable PATH with value D:\your_java_path\bin . Make sure "Append environment to native environment" is checked. Apply and Run.
An error occur while run the build.xml

but i got an error

Buildfile: D:\Eclipse\Sahi_Scripts\build.xml
all:
clean:
compile:
[javac] Compiling 130 source files to D:\Eclipse\Sahi_Scripts\classes
[javac] javac: target release 1.5 conflicts with default source release 1.7

BUILD FAILED
D:\Eclipse\Sahi_Scripts\build.xml:177: The following error occurred while executing this line:
D:\Eclipse\Sahi_Scripts\build.xml:38: Compile failed; see the compiler error output for details.

Total time: 440 milliseconds


I can't figure out what is wrong.
Please hep me.

Comments

  • globalwormingglobalworming Moderators
    edited June 2012
    Hi,

    when you look at http://sahi.svn.sourceforge.net/viewvc/sahi/branches/sahi_rhino_controller2/demo.xml?revision=2265&view=markup line 177 you see, that the task 'unittests' fails.
    Could you paste the console output when you run 'build.xml'?
    Try to find the place where a unit test fails. Commenting out the related tests may help getting a successful build.

    Regards
    Wormi
  • JithinJithin Members
    Hi Wormi ,

    Thanks for your reply

    I think the test is failed at 'Test net.sf.sahi.config.ConfigurationTest' and the console output is
    Buildfile: D:\Sahi_eclipse\sahi\build.xml
    all:
    clean:
    compile:
    [javac] Compiling 130 source files to D:\Sahi_eclipse\sahi\classes
    [copy] Copying 8 files to D:\Sahi_eclipse\sahi\classes\net\sf\sahi\resources
    compile-test:
    [javac] Compiling 54 source files to D:\Sahi_eclipse\sahi\classes
    [copy] Copying 1 file to D:\Sahi_eclipse\sahi\classes
    test:
    [delete] Deleting directory D:\Sahi_eclipse\sahi\userdata\temp\junit\tests
    [mkdir] Created dir: D:\Sahi_eclipse\sahi\userdata\temp\junit\tests
    [junit] Testsuite: net.sf.sahi.ProxyTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.668 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] >>>> Sahi started. Listening on port: 9999
    [junit] >>>> Configure your browser to use this server and port as its proxy
    [junit] >>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Controller
    [junit]
    [junit] Reading browser types from: D:\Sahi_eclipse\sahi\userdata\config\browser_types.xml
    [junit] Firefox 4 was not found at C:\Program Files\Mozilla Firefox 4.0 Beta 7\firefox.exe
    [junit] Opera was not found at C:\Program Files\Opera\opera.exe
    [junit]
    [junit] socket closed
    [junit]


    [junit] Testsuite: net.sf.sahi.RemoteRequestProcessorTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.217 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit]
    Standard Error
    [junit] Jun 13, 2012 10:23:01 AM net.sf.sahi.ssl.SSLHelper getKeyManagerFactoryForRemoteFetch
    [junit] INFO: No SSL Client Cert specified
    [junit]


    [junit] Testsuite: net.sf.sahi.ant.RunSahiTaskTest
    [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 4.352 sec
    [junit] Shutting down ...
    [junit] Shutting down ...
    [junit] Shutting down ...
    [junit] Shutting down ...
    [junit] Connection refused: connect
    [junit] Connection refused: connect
    [junit] Connection refused: connect
    [junit] Connection refused: connect
    [junit] Testsuite: net.sf.sahi.client.ElementStubTest
    [junit] Tests run: 11, Failures: 0, Errors: 0, Time elapsed: 0.167 sec
    [junit] Testsuite: net.sf.sahi.command.CommandExecuterTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.163 sec
    [junit] Testsuite: net.sf.sahi.command.CommandInvokerTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.146 sec
    [junit] Testsuite: net.sf.sahi.command.CustomResponseManagerTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.151 sec
    [junit] Testsuite: net.sf.sahi.config.ConfigurationTest
    [junit] Tests run: 5, Failures: 1, Errors: 0, Time elapsed: 0.181 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testcase: testInit(net.sf.sahi.config.ConfigurationTest): FAILED
    [junit] expected:<sahi> but was:<java>
    [junit] junit.framework.ComparisonFailure: expected:<sahi> but was:<java>
    [junit] at net.sf.sahi.config.ConfigurationTest.testInit(ConfigurationTest.java:59)
    [junit] Test net.sf.sahi.config.ConfigurationTest FAILED
    [junit] Testsuite: net.sf.sahi.issue.IssueFormatterTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.154 sec
    [junit] Testsuite: net.sf.sahi.issue.IssueReporterTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.167 sec
    [junit] Testsuite: net.sf.sahi.issue.JiraIssueCreatorTest
    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.353 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.playback.FileScriptTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.148 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.playback.SahiScriptHTMLAdapterTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.151 sec
    [junit] Testsuite: net.sf.sahi.playback.SahiScriptTest
    [junit] Tests run: 30, Failures: 0, Errors: 0, Time elapsed: 0.181 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.playback.ScriptHandlerTest
    [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.157 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.playback.URLScriptTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.15 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.plugin.DBClientTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.155 sec
    [junit] Testsuite: net.sf.sahi.report.HtmlFormatterTest
    [junit] Tests run: 10, Failures: 0, Errors: 0, Time elapsed: 0.156 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.report.HtmlReporterTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.143 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.report.JUnitFormatterTest
    [junit] Tests run: 10, Failures: 0, Errors: 0, Time elapsed: 0.167 sec
    [junit] Testsuite: net.sf.sahi.report.JunitReporterTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.153 sec
    [junit] Testsuite: net.sf.sahi.report.LogViewerTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.249 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.report.ReportTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.161 sec
    [junit] Testsuite: net.sf.sahi.report.SahiReporterTest
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.16 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.request.HttpRequestTest
    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.165 sec
    [junit] Testsuite: net.sf.sahi.request.MultiPartSubRequestTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.153 sec
    [junit] Testsuite: net.sf.sahi.response.HttpFileResponseTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.158 sec
    [junit] Testsuite: net.sf.sahi.response.HttpModifiedResponseTest
    [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.164 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Defaulting to charset iso-8859-1
    [junit]


    [junit] Testsuite: net.sf.sahi.response.MimeTypeTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.141 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.rhino.ScriptRunnerTest
    [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 1.173 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] _sahi._cell("AA")
    [junit] document.forms[0]
    [junit] _sahi._cell("AA").parentNode.parentNode
    [junit] _sahi._link("abcd").getElementsByTagName("DIV")[0]
    [junit] _sahi._link("abcd").getElementsByTagName("DIV")[25]
    [junit] _sahi._link("abcd").getElementsByTagName("DIV")[99]
    [junit] _sahi._cell("AA").parentNode.childNodes[22].previousSibling
    [junit] _sahi._cell("AA").document.forms[0].elements[11].value
    [junit] _sahi._checkbox(0, _sahi._near(_sahi._spandiv("To: narayan.raman")))
    [junit] _sahi._textbox(0).value.substring(_sahi._textbox(0).value.indexOf("aa"), 12)
    [junit] _sahi._link(/hi/)
    [junit] _sahi._table("t1").rows[0].cells[1]
    [junit] Step took too long (<cmd>#1)
    [junit]


    [junit] Testsuite: net.sf.sahi.session.SessionTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.153 sec
    [junit] Testsuite: net.sf.sahi.ssl.SSLHelperTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.153 sec
    [junit]
    Standard Output
    [junit] keytool.exe
    [junit] -dname
    [junit] CN=www.sahi.co.in, OU=Sahi
    [junit]


    [junit] Testsuite: net.sf.sahi.stream.filter.HTMLModifierFilterTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.142 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.stream.filter.JSModifierFilterTest
    [junit] Tests run: 13, Failures: 0, Errors: 0, Time elapsed: 0.156 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.test.BrowserLauncherTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.154 sec
    [junit] Testsuite: net.sf.sahi.test.ProcessHelperTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.152 sec
    [junit] Testsuite: net.sf.sahi.test.SahiTestTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.149 sec
    [junit] Testsuite: net.sf.sahi.test.SuiteLoaderTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.149 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.util.FileUtilsTest
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.166 sec
    [junit] Testsuite: net.sf.sahi.util.OSUtilsTest
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.185 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.util.SocketPoolTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.153 sec
    [junit] Testsuite: net.sf.sahi.util.URLParserTest
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.188 sec
    [junit]
    Standard Output
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit] Sahi properties file = D:\Sahi_eclipse\sahi\config\sahi.properties
    [junit] Sahi user properties file = D:\Sahi_eclipse\sahi\userdata\config\userdata.properties
    [junit]


    [junit] Testsuite: net.sf.sahi.util.UtilsTest
    [junit] Tests run: 15, Failures: 0, Errors: 0, Time elapsed: 0.22 sec
    [junit]
    Standard Output
    [junit] >> str2: Volume in drive D is Data
    [junit] Volume Serial Number is C6FD-9690
    [junit] Directory of D:\Sahi_eclipse\sahi
    [junit] 06/13/2012 10:23 AM <DIR> .
    [junit] 06/13/2012 10:23 AM <DIR> ..
    [junit] 06/12/2012 12:09 PM 1,529 .classpath
    [junit] 06/12/2012 05:15 PM 568 .project
    [junit] 06/12/2012 05:15 PM <DIR> .settings
    [junit] 06/12/2012 12:09 PM 3,737 antTest.xml
    [junit] 06/12/2012 05:06 PM <DIR> batch_runners
    [junit] 06/12/2012 05:06 PM <DIR> bin
    [junit] 06/13/2012 09:55 AM 22,502 build.xml
    [junit] 06/13/2012 10:22 AM <DIR> classes
    [junit] 06/12/2012 05:06 PM <DIR> config
    [junit] 06/12/2012 12:09 PM 12,570 demo.xml
    [junit] 06/12/2012 05:06 PM <DIR> docs
    [junit] 06/12/2012 05:06 PM <DIR> editors
    [junit] 06/12/2012 05:06 PM <DIR> extlib
    [junit] 06/12/2012 05:06 PM <DIR> htdocs
    [junit] 06/12/2012 12:09 PM 11,989 hudson.xml
    [junit] 06/12/2012 05:06 PM <DIR> installer
    [junit] 06/13/2012 10:23 AM 8,594 junit1439070091.properties
    [junit] 06/13/2012 10:23 AM 342,424 junittestrun.out
    [junit] 06/13/2012 10:23 AM 23 junitvmwatcher132334078.properties
    [junit] 06/12/2012 12:09 PM 343 NOTICE.htm
    [junit] 06/12/2012 12:09 PM 236 NOTICE.txt
    [junit] 06/12/2012 05:06 PM <DIR> ruby
    [junit] 06/13/2012 10:23 AM 123 sahi0.log
    [junit] 06/13/2012 10:21 AM 123 sahi1.log
    [junit] 06/13/2012 10:16 AM 123 sahi2.log
    [junit] 06/13/2012 09:55 AM 122 sahi3.log
    [junit] 06/13/2012 09:52 AM 122 sahi4.log
    [junit] 06/13/2012 09:41 AM 122 sahi5.log
    [junit] 06/12/2012 06:06 PM 122 sahi6.log
    [junit] 06/12/2012 05:33 PM 122 sahi7.log
    [junit] 06/12/2012 05:27 PM 122 sahi8.log
    [junit] 06/12/2012 05:06 PM <DIR> sample_java_project
    [junit] 06/12/2012 05:06 PM <DIR> src
    [junit] 06/12/2012 12:09 PM 11,142 stress.xml
    [junit] 06/12/2012 05:06 PM <DIR> test
    [junit] 06/12/2012 05:06 PM <DIR> tools
    [junit] 06/12/2012 05:27 PM <DIR> userdata
    [junit] 21 File(s) 416,758 bytes
    [junit] 18 Dir(s) 253,815,115,776 bytes free
    [junit] 15
    [junit] includes/sahi_demo_include.sah
    [junit] http://localhost:9999/_s_/scripts/sahi_demo_include.sah
    [junit]


    report-gen:
    [delete] Deleting directory D:\Sahi_eclipse\sahi\userdata\temp\junit\reports\junit-html
    [mkdir] Created dir: D:\Sahi_eclipse\sahi\userdata\temp\junit\reports\junit-html
    [junitreport] Processing D:\Sahi_eclipse\sahi\userdata\temp\junit\reports\TESTS-TestSuites-junit.xml to C:\Users\DMC003\AppData\Local\Temp\null327449586
    [junitreport] Loading stylesheet jar:file:/D:/Sahi_eclipse/eclipse-jee-ganymede-SR2-win32/eclipse/plugins/org.apache.ant_1.7.0.v200803061910/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
    [junitreport] : Error! Use of the extension element 'redirect' is not allowed when the secure processing feature is set to true.
    [junitreport] Failed to process D:\Sahi_eclipse\sahi\userdata\temp\junit\reports\TESTS-TestSuites-junit.xml

    BUILD FAILED
    D:\Sahi_eclipse\sahi\build.xml:177: The following error occurred while executing this line:
    D:\Sahi_eclipse\sahi\build.xml:556: The following error occurred while executing this line:
    D:\Sahi_eclipse\sahi\build.xml:566: Errors while applying transformations: javax.xml.transform.TransformerException: java.lang.RuntimeException: Use of the extension element 'redirect' is not allowed when the secure processing feature is set to true.

    Total time: 25 seconds

    I am using windows 7 Professional and Java\jdk1.6.0_29

    Could you please help me for a successful build?
  • [junit] junit.framework.ComparisonFailure: expected:<sahi> but was:<java>
    [junit] at net.sf.sahi.config.ConfigurationTest.testInit(ConfigurationTest.java:59)
    [junit] Test net.sf.sahi.config.ConfigurationTest FAILED
    Which svn resource are you using? I can't find sahi_rhino_controller2>src>net>sf>sahi>config>ConfigurationTest

    You may want to check out the latest OS version here: http://sahi.svn.sourceforge.net/viewvc/sahi/trunk/sahi/ :)
  • hai i am not able to run the java project how i should run plz help me
  • Please open a new topic and explain your whole problem there. Add the error messages you encounter. What sahi-/browserversion are you using?
  • JithinJithin Members
    Hi Wormi ,

    I am using svn resource provided by narayan in the post

    'How to build Sahi source code using Eclipse IDE' -(6 , 2009-12-29 01:07:48)
  • Well.. I would recommend using the latest version of the source code and try building this.
    http://sourceforge.net/projects/sahi/files/sahi-v35/20110719/sahi-src_20110719.zip
    this worked for me.. but I can't promise any better results
  • HI All ,

    i am trying to run sahi sample script on eclipse.Below is my script and i am getting following error.

    package pac;
    import net.sf.sahi.client.Browser;
    import net.sf.sahi.config.Configuration;
    public class openbrowser {
    public static void main(String[] args) {
    String sahiBase = "C:\\sahi"; // where Sahi is installed or unzipped
    String userDataDirectory = "C:\\sahi\\userdata"; //path to the userdata directory
    Configuration.initJava(sahiBase, userDataDirectory);
    // Sets up configuration for proxy. Sets Controller to java mode.
    String browserType = "ie";
    // You can specify the browser you want to run the tests on.
    // browserType can take any value defined in
    // sahi/userdata/config/browser_types.xml
    // Create a browser and open it
    Browser browser = new Browser(browserType);
    browser.open();
    browser.navigateTo("http://www.google.com";);
    browser.textbox("q").setValue("sahi forums");
    browser.submit("Google Search").click();
    browser.waitFor(1000);
    // browser.link("Forums – Sahi – Web Automation and Test Tool”).click();
    // browser.link(“Login”).click();
    // System.out.println(”:: browser.textbox(\“req_username\”).exists() = “
    // + browser.textbox(“req_username”).exists());

    // close the browser
    // browser.close();
    }

    I am getting below error
    Sahi properties file = C:\sahi\config\sahi.properties
    Sahi user properties file = C:\sahi\userdata\config\userdata.properties
    java.net.ConnectException: Connection refused: connect
    at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)
    at net.sf.sahi.util.Utils.readURL(Utils.java:129)
    at net.sf.sahi.util.Utils.readURL(Utils.java:111)
    at net.sf.sahi.client.Browser.execCommand(Browser.java:154)
    at net.sf.sahi.client.Browser.openURL(Browser.java:266)
    at net.sf.sahi.client.Browser.open(Browser.java:241)
    at pac.openbrowser.main(openbrowser.java:22)
    java.lang.NullPointerException
    at net.sf.sahi.util.Utils.readURL(Utils.java:137)
    at net.sf.sahi.util.Utils.readURL(Utils.java:111)
    at net.sf.sahi.client.Browser.execCommand(Browser.java:154)
    at net.sf.sahi.client.Browser.openURL(Browser.java:266)
    at net.sf.sahi.client.Browser.open(Browser.java:241)
    at pac.openbrowser.main(openbrowser.java:22)
    Exception in thread "main" java.lang.NullPointerException
    at java.lang.String.<init>(Unknown Source)
    at net.sf.sahi.client.Browser.execCommand(Browser.java:154)
    at net.sf.sahi.client.Browser.openURL(Browser.java:266)
    at net.sf.sahi.client.Browser.open(Browser.java:241)
    at pac.openbrowser.main(openbrowser.java:22)
  • HI globalworming,

    i am unable to access above link http://sahi.co.in/forums/viewtopic.php?pid=15121#p15121
    can you please post me the solution .

    Thnaks & Regards,
    Nithin Sasalu
  • globalwormingglobalworming Moderators
    edited January 2013
    http://sahi.co.in/forums/discussion/comment/15121
    but you already found that... seems like it did not help much
Sign In or Register to comment.