← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #691293]: Fault tolerance for target images

 

Question #691293 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691293

    Status: Needs information => Answered

TestMechanic proposed the following answer:
I think I understand Robin concern and will try to share my approach.

Here are some recommendations based on my 8 years experience using
Sikuli for testing applications on Mac, Windows and Linux:

1. Try whenever possible to use same resolution on test development and test execution machines. 
Why?: Because many web and desktop applications now have responsive design and will scale their UI elements when width of app is changing. You can mitigate this by using fixed window size if resolution change is not an option.
The another problem with resolution is that visible area of the screen is different. So for example you may need to scroll down to see some element visible on higher resolution.
In general you need to keep not only resolution similar, but also things like fonts smotening/clear types, color schema... etc.

2. However when testing a multi platform application( or inability to keep resolution for one platform similar) you may use following approach
make a Sikuli ui-map file that contains only UI map definitions of your elements. Here is the example:

class NotepadUI:
  class scrSettings:
    button_Save = button_save.png
    button_Cancel = button_cancel.png

Then in your script use elements like this:
  click(NotepadUI.scrSettings.button_Save)

Make your tests running with this UI map on one OS(or in your case resolution)
Then create second(and third and so on) UI maps for different OSes(or ui configurations)

How this helps

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.