Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

7 ‐ Robot Framework keywords API

Pierre-Yves Lapersonne edited this page Oct 28, 2024 · 1 revision

Robot Framework keywords API

Some Robot Framework keywords have been defined in order to use the Tapster robot for test cases in ATDD/TDD/BDD methods. The keywords match the robot's HTTP API.

Keywords Parameters Description of parameters Returned values Comment
Create robot session session_alias ; robotUrl (opt) Alias of the session ; URL of the server (optional) The created session Creates a new session with the server.
Delete robot session session_alias ; robotUrl (opt) Alias of the session ; URL of the server (optional) The created session Deletes the session which has this alias.
Wait duration (opt) The duration to wait after an atomic operation Nothing There is no temporisation §/ cache of requests. So we have to wait between each request so as to be sure the server has dealed all of them
Check connection of robot session The session made with the server The server's response Check if the connection with the robot's server has been established
Get angles of arms session The session made with the server The angles of the arms Gets the angles of the three arms, i.e. finaly the servomotors
Set angles of arms session ; theta1 ; theta2 ; theta3 The session made with the server ; the 3 angles The server's response Defines the angles of the three arms, i.e. finaly the servomotors
Get 3D position session The session made with the server The 3D position Gets the position in 3D landmark of the robot
Set 3D position session ; x ; y ; z The session made with the server ; the (x,y,z) point The server's response Defines the position in 3D landmark of the finger of the robot
Tap to point session ; x ; y The server's session ; the (x,y) point to tap on The server's response Taps on the point at (x,y) in 2D landmark
Long tap to point session ; x ; y ; duration (opt) Server's session ; the (x,y) point, duration to wait The serv's response Tap on the (x,y) point and wait a this position during duration
Double tap to point session ; x ; y The server's session ; the (x,y) point to tap on The server's response Make a double tap on point (x,y)
Triple tap to point session ; x ; y The server's session ; the (x,y) point to tap on The server's response Make a triple tap on point (x,y)
Reset session The server's session The server's response Resets the position of the arms of the robot in their initial states
Get calibration data session The server's session The calibration data in JSON format Returns in JSON format the calibration data the robot's server uses
Set calibration data session ; calibration_data The server's session ; calibration data in JSON format The server's reponses Defines the claibration data the robot's server must use
Get status session The server's session The status of the robot's server Gets the status of the robot's server
Dance session The server's session The server's response Make the robot dance
Stop dance session The server's session The server's response Make the robot stop dancing
Swipe session ; a ; b ; c ; d The server's session ; x1 ; y1 ; x2 ; y2 The server's response Make the robot swipe from (a,b) to (c,d)
Tap n times session ; n ; x ; y Server's session ; number of taps ; coordinates (x,y) The server's response Makes the robot tap n times on the point at (x,y)
Swipe n times session ; n ; a ; b ; c ; d Server's session ; number of taps ; x1 ; y1 ; x2 ; y2 The server's response Makes the robot swipe n times from( a,b) to (c,d)
Position for screen session ; x ; y The server's session ; coordinates (x,y) The position Returns the position of the robot's (3D point) finger for an (x,y) point
Angles for position session ; x ; y ; z The server's session ; coordinates (x,y,z) The angles of the arms Returns the angles of the arms for a point at (x,y,z)
Get contact Z session The server's session The Z values Returns the Z-axis value of the contact point, i.e. where the finger of the robot can touch the screen of the device under it
Stress taps session ; n ; x ; y Server's session ; number of taps ; coordinates (x,y) The server's response Makes the robot make n quick tap on (x,y) point
Stress swipes session ; n ; a ; b ; c ; d Server's session ; number of swipes ; x1 ; y1 ; x2 ; y2 The server's response Makes the robot make n quick swipes from (a,b) to (c,d) points
Draw random pattern session ; n ; minWidth ; minHeight ; maxWidth ; maxHeight Server's session ; number of points (n-1 strokes), values defining the draw area The server's reponse Draws a random pattern using continuous strokes on a defined area
Draw star session Server's session The server's response Draws a lovely star
Draw circle session ; x ; y ; r Server's session ; centered on (x,y) ; radius The server's response Draws a circle centered on (x,y) with the r radius
Draw cross session ; x1 ; y1 ; x2 ; y2 ; x3 ; y3 ; x4 ; y4 Server's session ; points used for strokes The server's response Draws a cross with two strokes: one from 1 to 4, the other from 2 to 3
Draw square session ; n ; length Server's session ; ratio of points to draw ; length The server's response Draws a square using a ratio of points to draw and a length
Draw triangle session ; x1 ; y1 ; x2 ; y2 ; x3 ; y3 Server's session ; 3 points to use for the triangle The server's response Draws a triangle using three points (x1,y1), (x2,y2), (x3,y3)
Draw spiral session ; x ; y ; n ; r Server's session ; center (x,y) ; number of loops ; radius The server's response Draws a spiral with n loops, an r radius centered on the (x,y) point