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.
Calling Java classes from Sahi
Hi,
I am trying to use some java classes through Sahi. So I placed the class file in the util folder and tried to access a method in the class in the same way u have specified above. But I am getting an error "JSERROR TypeError: PrintName is not a function, it is org.mozilla.javascript.NativeJavaPackage." Can you please tell me how to include the class file. Also I tried to include the class by placing jar file in extlib and including the path in sahi.bat . But I am not able to access the class. I need to include some java classes for the functionality and also i need to use objects of those classes. Can u please help me how to include classes and to declare objects for any class in the Sahi script.
I am trying to use some java classes through Sahi. So I placed the class file in the util folder and tried to access a method in the class in the same way u have specified above. But I am getting an error "JSERROR TypeError: PrintName is not a function, it is org.mozilla.javascript.NativeJavaPackage." Can you please tell me how to include the class file. Also I tried to include the class by placing jar file in extlib and including the path in sahi.bat . But I am not able to access the class. I need to include some java classes for the functionality and also i need to use objects of those classes. Can u please help me how to include classes and to declare objects for any class in the Sahi script.
Tagged:
This discussion has been closed.
Comments