I’m trying to run a test that contains Sikuli methods in it via Katalon-Studio. I added the necessary libraries but still getting this error when it tries to execute the Sikuli command:
[error] ResourceLoaderBasic: checkLibsDir: libs dir is not on system path: C:\Users\roinr\git\QA\Drivers\libs
[action] ResourceLoaderBasic: checkLibsDir: Please wait! Trying to add it to user's path [info] runcmd: reg QUERY HKCU [info] runcmd: reg QUERY HKEY_CURRENT_USER\Environment /v PATH [error] ResourceLoaderBasic: checkLibsDir: Logout and Login again! (Since libs folder is in user's path, but not activated) [error] Terminating SikuliX after a fatal error! 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.
This is my script:
import internal.GlobalVariable as GlobalVariable
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.sikuli.script.Key;
import org.sikuli.script.Screen;
//Initializing server
System.setProperty("webdriver.chrome.driver", "C:/selenium/chromedriver.exe");
//Initializing variables
ChromeDriver wd = new ChromeDriver();
WebDriverWait wait = new WebDriverWait(wd,10);
Screen s = new Screen();
wd.manage().window().maximize();
wd.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
System.out.println("*** Login Sikuli ***");
wd.get("https://autoqa-materials-zone.firebaseapp.com/login");
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[2]/div/input")));
wd.findElement(By.xpath("//div[2]/div/input")).click();
try { Thread.sleep(1000l); } catch (Exception e) { throw new RuntimeException(e); }
s.paste("<USERNAME>");
try { Thread.sleep(1000l); } catch (Exception e) { throw new RuntimeException(e); }
s.type(Key.TAB);
try { Thread.sleep(800l); } catch (Exception e) { throw new RuntimeException(e); }
s.paste("<PASSWORD>");
try { Thread.sleep(1000l); } catch (Exception e) { throw new RuntimeException(e); }
wd.findElement(By.xpath("//form[@id='form']//paper-button[.='login']")).click();
try { Thread.sleep(5000l); } catch (Exception e) { throw new RuntimeException(e); }
wd.quit();
Hope you can help me with that,
thanks.