The following steps are required to set up Sakuli to work with multiple browsers. Once the initial setup is done, we will dive right into our first test.
Sakuli utilizes the WebDriver protocol to remote control browsers during test execution.
In addition to the browser itself, you need to install the corresponding WebDriver as well.
Several wrapper packages can be found on npmjs.com, which allow the installation of the required binaries via
Since some users encountered issues with geckodriver on Firefox, we recommend using chromedriver for now. We are working on fixes and workarounds for geckodriver.
Therefore, Chrome is the preferred browser for running Sakuli tests at the moment. A suitable WebDriver can be installed via:
npm i chromedriver
yarn add chromedriver
Attention: Be careful to install the correct version of a WebDriver package according to the installed browser version. To install e.g. ChromeDriver for Chrome 73 you have to install:
npm i email@example.com
Sakuli is not limited to work with only a single browser. When installing multiple WebDriver packages, you can easily switch between different browsers.
Regarding Windows Users: You will have to manually add the respective WebDriver location to your system
PATH, otherwise Sakuli will not be able to find and use it. Once you installed a WebDriver package via NPM, you will be prompted with its installation path, so you can easily add it to your
One of Sakuli’s core components, nut.js, requires OpenCV. Sakuli ships a pre-built version of OpenCV. Nonetheless, the installation still requires some 3rd-party dependencies.
To avoid eventual installation problems for Windows users we recommend to first install Python 2 on your system separately by downloading the required version from the official web page. Afterwards you can install the Windows Build Tools manually or via NPM using:
npm install --global windows-build-tools
yarn global add windows-build-tools
In case of errors while installing the Windows Build Tools package via
npm, please make sure that the PowerShell is available on your system
PATH. Additionally, you should install the Windows Build Tools by using the PowerShell in administrative mode.
See this issue.
On macOS, Xcode command line tools are required. You can install them by running:
Depending on your distribution, Linux setups may differ.
In general, Sakuli requires:
Installation on *buntu:
sudo apt-get install build-essential python libxtst-dev libpng++-dev
The installation process is an open issue and will be improved in the near future, so using Sakuli will become even more enjoyable!
We will now install Sakuli in our newly created project by running:
npm i @sakuli/cli
yarn add @sakuli/cli
This will install Sakuli and its required dependencies.