RobotUnion Node.js SDK (experimental)
Toolset to create Robot Apps for RALLF based on selenium-webdriver
Index
First steps
Installation
- Run
npm install rallf-sdk --save
to install the sdk
Create simple Robot Task
-
Create the Task manifest
manifest.json
within theconfig
folder- The name of your task will be the one in
manifest.json
- You can get the access key and secret from RALLF Panel
main
: should be the main file of the RobotAppsrc/main.js
- The name of your task will be the one in
-
Create a
src
folder within your app folder -
Now create the main file for your app
main.js
insidesrc
-
RobotApp Example
/*File: 'src/main.js'*/const Task = ;{super;}{thislogger;this;}{thislogger;}{thislogger;}{let device = thisdevice;let logger = thislogger;let robot = thisrobot;let input = thisinput;logger;// Must return a promisereturn device;}moduleexports = MyFirstTask;- First you need to require
Task
fromExecution/Task
- Now create a class to extend
Task
from - Finally create a
run
function, this funtion is going to run when the Task is executed. - Check the docs here: selenium-webdriver
- First you need to require
Run Locally
This will run the task as and log locally.
$ node ./node_modules/rallf-sdk/bin/rallf-js-runner.js .
Usage: rallf-js-runner.js <task_path> <json_robot> <json_input>