Sikulix cannot find search bar on Windows 11

Asked by Mika

Hi,
I try to learn sikulix and write test. In my test I want to click on Windows Start menu button (Win11) then click on search bar and type name of the app that I want to find and open (for example: calculator).
Finding windows start menu button works but then I get failure beacuse it cannot find search bar. I have tried to save image of search bar with smaller and bigger area around it, but id didn't help.

I use:
- sikulix,
- Intelijj (maven project),
- Windows 11.

My code:

Pattern windowButton = new Pattern(System.getProperty("user.dir")+"\\src\\main\\resources\\windowsMainButton.png");
Pattern searchField = new Pattern(System.getProperty("user.dir")+"\\src\\main\\resources\\searchField.png");

sc.click(windowButton);
sc.click(searchField); //here I get error
sc.type(searchField, "calc"+Key.ENTER);

Is there any way to find this bar?

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Davy Verbogt (aligatetcolt) said :
#1

What would be the error that your recieving.

I did try to do this they way i have written my other test scripts and it did work that way.

ImagePath.add(Path To Image);

Screen sc = new Screen();

sc.click(sc.wait("Win11.png"));
 sc.click(sc.wait("Search.png"));

sc.write("calc");
sc.type(Key.ENTER);

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.