rainmanwy / robotframework-SikuliLibrary

Sikuli Robot Framework Library provide keywords for Robot Framework to test UI through Sikuli.
Apache License 2.0
144 stars 61 forks source link

Robot framework scripts throwing "java.lang.ExceptionInInitializerError: null" error always. #108

Open VijayAnanthP opened 5 years ago

VijayAnanthP commented 5 years ago

After launching URL like "Facebook.com" i have used Add Image path and Click keywords. While executing Click Keyword it throwing the error java.lang.ExceptionInInitializerError: null

Settings Library SikuliLibrary Library SeleniumLibrary

Variables ${URL} https://https://www.facebook.com/

Test Cases Login Application Launching Application and Login Keywords Launching Application and Login Open Browser ${URL} Chrome Maximize Browser Window Sleep 3 Add Image Path D:\NDMT\NDMT_Automation\01_NDMT_TestCase\SoftPKI\Images\ Click Login.PNG

rainmanwy commented 5 years ago

@VijayAnanthP , could you attach log.html and sikuli console log file.

mevangulf commented 5 years ago

I have same kind of problem. If you try to click something with sikuli it gives that same error. However, capture screen works fine.

My sikuli log file: Sikuli_java_stdout_1567158997.4304018.txt

And my Test Execution Log: testExecutionLog

veena-anup commented 5 years ago

I am also seeing java.lang.ExceptionInInitializerError while executing click keyword.

rainmanwy commented 5 years ago

@mevangulf , how "SikuliLibrary" is imported? I found that you call "Start Sikuli Process" in step, Do you use NEW MODE in your robot case?

@veena-anup , how about the Operating System you are using?

veena-anup commented 5 years ago

Hi Rainmanwy, Thanks for the reply. I am on windows 64 bit machine.I do not know what I did(updated java I guess) now click command is working but its not actually clicking on the image I specified.When checked the report I see captured image is only half of the scree and in lesser resolution it is captured to search for the image. Did I miss anything here.Please help. I have just imported Sikulilibrary using pip in robot framework and using pycharm IDE.

veena-anup commented 5 years ago

Finally it's working.. I had to do scaling to 125℅ n re login to the system. Then it started working.

cmision commented 4 years ago

Hi, I'm also getting this error on my Windows 10 machine.

Logfile

In my project, the Java_stderr and java_stdout look quite plain Sikuli_Java

Pip List is bare, with Robotframework-sikulilibrary and robotframework installed directly through pip PipList

Running java -version: java version "1.8.0_231" Java(TM) SE Runtime Environment (build 1.8.0_231-b11) Java HotSpot(TM) Client VM (build 25.231-b11, mixed mode, sharing)

The test itself is quite simple, just clicking on a button on the Windows 10 calculator.

*** Settings ***
Library  SikuliLibrary  mode=NEW

*** Variables ***

*** Test Cases ***
TC_000 Check
  Start Sikuli Process
  Add Image Path  ./Sikulimages
  Click  button8.PNG
cmision commented 4 years ago

I might also add, PATH is set to: PATH=C:\Program Files\Python38\Scripts\;C:\Program Files\Python38\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Microsoft MPI\Bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\PuTTY\;C:\Users\cmisi\AppData\Local\Microsoft\WindowsApps;C:\Users\cmisi\AppData\Local\GitHubDesktop\bin;D:\Programming\Gecko;C:\Users\cmisi\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.1\bin

cmision commented 4 years ago

Actually, nevermind. Figured it out. The JRE automatically installed from https://java.com/en/download/ was the 32 bit version. When I picked up the 64 bit version from https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html, it worked.