3

I have a problem while using SikuliLibrary because my tests should be run on both Windows 7 and Windows 10. How can I proceed? Some images are the same but sometimes there is a big difference so that it's impossible to find it. What do you suggest?

  • Use a condition if Sikuli finds image 1 in Windows 7 or image 2 in Windows 10?
  • Do you have any other suggestion or library to use (not AutoIt because the click is not the same when I change from one screen to another; I run tests in server)?
Bookeater
  • 474
  • 1
  • 7
  • 12
Emna Ayadi
  • 2,430
  • 8
  • 37
  • 77

2 Answers2

3

Just answered a very similar question here. Sikuli is working using a very simple principle, scan the screen and match the stored pattern with a defined similarity score. There is no way to apply a configuration that would allow using alternative patterns on different systems.

There are few possible solutions when running Sikuli on a machine different from one where the patterns were created. This is in case there are only minor differences.

  1. Switch ClearType off (only for Windows)
  2. Reduce similarity score
  3. Turn off "Smooth screen fonts edges" (only for Windows)

More details can be found in this article.

Eugene S
  • 6,709
  • 8
  • 57
  • 91
1

You could organize your images with an operating system filename suffix. For example consider the following pseudocode:

# On Suite Setup
${Platform}=    Set Variable If    Windows7     '_Win7'    '_Win10'
Set Suite Variable    ${Platform}

# On Test case
# Then the file name should be selected by
Click    ${mySomethingButton}${Platform}.png
Helio
  • 3,322
  • 1
  • 14
  • 23
  • Hi Helio, thanks for your anwser but i want some thing more generic in order to avoid 2 captures for each image in our test that have conflict between win 7 and win 10 – Emna Ayadi Jun 15 '17 at 23:54