Giter Site home page Giter Site logo

docker-sikulix's Introduction

SikuliX (previously known as Sikuli) automates anything you see on the screen. It uses image recognition powered by OpenCV to identify and control GUI components. This is handy in cases when there is no easy access to a GUI's internals or the source code of the application or web page you want to act on.

You want to automate some repetetive tasks in:

  • daily usage of applications or web pages
  • playing games
  • administration of IT systems and networks
  • test applications or web pages
  • make/run a demo or training material live

Feature of this Dockerized image

Contains latest SikuliX with Jypthon (currently the nightly build 1.1.1 because it's the first that can still run even when wmctrl isn't fully working, on Xvfb):

  • Simple to run (see usage below).
  • Small image (or as small as possible).
  • Secure: Meant to be run as any user (non root user is good).

Usage

Run the GUI

Run the GUI (must run as your current user):

$ docker run --rm -it --user $UID -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v $PWD:/code wernight/sikulix

Note: Here we mounted current directory as /code so you may store your scripts there. This is of course optional.

Run headless

HEADLESS PROBABLY WON'T WORK AS OF CURRENT STATE - YOU'LL HAVE TO FIDDLE WITH IT

First you need to run a X11 program, for example you may run Chromium using Xvfb (but you may as well run Android the same way):

$ docker run --rm --name chromium -v /tmp/.X11-unix -it markadams/chromium-xvfb xvfb-chromium

Now run an existing script on it:

$ docker run --rm -e DISPLAY=:99 --volumes-from chromium -v $PWD:/code:ro wernight/sikulix runsikulix -c -r /code/my_script.sikuli

See SikuliX command-line options or run runsikulix -h.

WARNING: Due to bug #183 use only the short command-line form for flags (e.g. -h instead of --help).

Keep in mind that to forward X you'll need:

  • Run as the same user.
  • Use the same DISPLAY environment variable (usually :99 if using Xvfb).
  • Mount /tmp/.X11-unix (as read-only).

Note: Here we run as root to make it simpler, but you should avoid it (for security). Add --user flag and run as any user you want, like any random integer in [2000-32000] as long as that user has read access to your mounted files, and it's the same as the one running X11 (i.e. Xvfb).

Feedbacks

Having more issues? Report a bug on GitHub.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.