← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #665575]: Unable to load the Selenium jar file in the common file

 

Question #665575 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665575

    Status: Open => Answered

RaiMan proposed the following answer:
ok, understood.

This is how modularized Python works.
Since every module has its own namespace, you have to make all external  names known in this module. In your case the feature is import.

But you are on a not necessary complex way: Since you are using the Jython interpreter, you can use jars on the Java classpath directly, no need to use load(), to get the jar on the Python path.
The load() feature is there for jars with mixed Java and Python content.

This leaves you with the imports only.

The next step would be to hide the detailed Selenium stuff needed in
every module, by concentrating it to one module (what you apparently
already decided to do), that has the imports and def's to be used in the
other modules for steps, that are repeated more than once.

BTW: In this scenario I do not understand the decision for Python
scripting. A clean Java solution would be much more straight forward.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.