Getting Started
Welcome to the wdio-ocr-service
documentation. It will help you to get started fast. If you run into problems, you
can find help and answers on my wdio-ocr-service Gitter Channel or
you can hit me on Twitter.
#
InstallationThe easiest way is to keep wdio-ocr-service
as a devDependency in your package.json
.
You can simply do it by:
Instructions on how to install WebdriverIO
can be found here.
note
This module uses Tesseract as an OCR engine. By default, it will verify if you have a local installation of Tesseract installed on your system, if so, it will use that. If not, it will use the Node.js Tesseract.js module which is automatically installed for you.
Instruction on how to install Tesseract on your local system can be found here.
caution
For installation questions / errors with Tesseract please refer to the Tesseract project.
#
ConfigurationIn order to use the service you need to add ocr
to your services array in wdio.conf.js
#
Configuration OptionsThe following configuration options are supported and are all optional.
Option | Default | Description |
---|---|---|
ocrImagesPath | {project-root}/.tmp | The folder where the OCR-results are stored |
ocrLanguage | eng | The language that Tesseract will recognize. More info here. |
#
LogsThis module will automatically extra logs to the WebdriverIO logs. It writes to the INFO
and WARN
logs with the name
wdio-ocr-service
.
Examples can be found below.