I am trying to run a selenium integrated sikuli java application from mac in Eclipse IDE but it is throwing errors. I have added sikuli script, selenium and chromedriver to /Applications/setup path.
This application is working in windows but seems some issues running on mac os.
Attached is the code and error message, could someone please help me with this.enter image description here
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.sikuli.script.FindFailed;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;
import org.testng.annotations.Test;
public class SikuliGameLoad {
@Test
public static void main(String[] args) throws FindFailed {
System.setProperty("webdriver.chrome.driver",
"/Applications/setup/chromedriver");
WebDriver driver = new ChromeDriver();
driver.get("https://accounts.google.com");
driver.manage().window().maximize();
Screen screen = new Screen();
Pattern image = new
Pattern("/Users/name/Documents/workspace/Web/imgs/gmail.png");
screen.wait(image,10);
screen.doubleClick(image);
//screen.click(image3);
}
}
Error:
/Applications/setup/chromedriver Starting ChromeDriver 2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b) on port 46875 Only local connections are allowed. [error] ResourceLoaderBasic: checkLibsDir: Not a valid libs dir for SikuliX (x86_64): /Applications/setup/libs [error] ResourceLoaderBasic: check: libs dir is empty, has wrong content or is outdated [action] ResourceLoaderBasic: check: Please wait! Trying to extract libs to: /Applications/setup/libs [error] ResourceLoaderBasic: checkLibsDir: Not a valid libs dir for SikuliX (x86_64): /Applications/setup/libs [error] ResourceLoaderBasic: loadLib: Fatal Error 109: not found: /Applications/setup/libs/libVisionProxy.dylib [error] Terminating SikuliX after a fatal error(109)! Sorry, but it makes no sense to continue! If you do not have any idea about the error cause or solution, run again with a Debug level of 3. You might paste the output to the Q&A board.
Update:Instead of sikuli script jar I have added sikulixapi.jar and facing below issues:
Exception in thread "main" FindFailed: /Users/name/Documents/workspace/SikuliGameLoad/Images/options.png: (182x56) in S(0)[0,0 1440x900] E:Y, T:3.0 Line 2754, in file Region.java
at org.sikuli.script.Region.wait(Region.java:2754)
at com.sg.test.SikuliGameLoad.SikuliTest.main(SikuliTest.java:26)