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.

NullPointerException using Sahi Ant Task w/o browserProcessName

ThragorThragor Members
edited November -1 in Sahi - Open Source
Hello,

I had to figure out the cause of an exception I got when changing from Sahi Version in June to Sahi Version (V2) in October:
java.lang.NullPointerException
     at java.net.URLEncoder.encode(URLEncoder.java:188)
     at net.sf.sahi.test.TestRunner.encode(TestRunner.java:206)
     at net.sf.sahi.test.TestRunner.execute(TestRunner.java:130)
     at net.sf.sahi.ant.RunSahiTask.startServer(RunSahiTask.java:95)
     at net.sf.sahi.ant.RunSahiTask.execute(RunSahiTask.java:76)
...
I had to look into the source code to get the reason for this: RunSahiTask seems to define a new property browserProcessName which has no default value. But encode(browserProcessName) is called which fails with the NPE above.

I expect that browserProcessName should be something like the name of the process in the Task List. Thus I set it to iexplore for Internet Explorer and firefox for Firefox. Don't know if this is ok.

Can somebody provide some more details? The page "Automating running of multiple tests/running in batch mode" (sorry, I am not allowed to post the URL) seems to be outdated by the way as it doesn't mention browserProcessName.

Regards,
Mark
Sign In or Register to comment.