[2.0.5] Selenium library using Sikuli IDE --- start from command line with class path set

Asked by Alberto

Using Sikuli IDE version 2.0.5, I want to know if I can import the Selenium library.
I download the latest version of Selenium server version:

load("selenium-server-4.0.0.jar")
from org.openqa.selenium.chrome import ChromeDriver
browser = ChromeDriver()

but i got

[error] script [ prova2 ] stopped with error in line 4
[error] java.lang.NoSuchMethodError ( java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector; )
[error] --- Traceback --- error source first
line: module ( function ) statement
4: main ( <module> ) browser = ChromeDriver()
[error] --- Traceback --- end --------------

I don't know if the problem is "chromedriver.exe". I don't know how to specify the path.
Please let me know if there is a valid solution to use Selenium with SikuliX IDE.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Alberto
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Sorry, but the load() function does not work anymore since Java 9 (no longer possible to add stuff to the Java class path after start).

a possible workaround is to start the IDE from a command line and prepare the Java class path before or in the java command:

java -cp <your jars you need...>;sikulixide....jar org.sikuli.ide.Sikulix

Revision history for this message
Alberto (berruson) said :
#2

Thanks. I don't know how can specify the driver path so i got error:

[error] script [ prova2 ] stopped with error in line 4
[error] java.lang.IllegalStateException ( java.lang.IllegalStateException: The path to the driver executable The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from https://chromedriver.storage.googleapis.com/index.html )
[error] --- Traceback --- error source first
line: module ( function ) statement
4: main ( <module> ) browser = ChromeDriver()
[error] --- Traceback --- end --------------

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Sorry, but that is WebDriver specific - follow the given links or search the net for solutions.

This Q&A board is for SikuliX specific stuff.

Revision history for this message
Alberto (berruson) said :
#4

Thanks for information.