Open frankiezdh opened 6 years ago
I find a solution.
Screen s = new Screen();
try {
ImagePath.add(new ClassPathResource("images").getURL());
s.click("1.png");
} catch (Exception e) {
e.printStackTrace();
}
Apparently, the class-reference-imagePath does not work in a spring application.
ImagePath.add(new ClassPathResource("images").getURL());
Is ClassPathResource Spring specific or Java standard?
@RaiMan I think iClassPathResource is specificed by Spring.
I wrote a spring boot application. The application is compiled and packaged into a jar. I unzip the jar, get the file structure like below.
I use sikulixapi (java code below) in WechatService.class
but i get an error while running. I read the doc faq/030-java-dev and where-sikulix-looks-for-image-files, but no help.
by the way sikulix version 1.1.2-snapshot