Skip to content

Types of Steps

Nitin Surana edited this page Feb 15, 2016 · 5 revisions

##A step comprises of the following attributes -

###1. selector (required, optional if type is specified) This is used to find the necessary element.

###2. wait (optional, default = 20 //10 seconds) Wait is how many seconds a step selector has to be checked for before failing the entire recipe. It should be specified twice the number of seconds you want that step to wait.

CATCH - RepeatIt finds elements every 500ms, hence the wait for 10 seconds, has to be specified as 20.

###3. action (optional, default click);

  • input
    Used for input[type=text] HTML elements.
  • redactor
    Used for contenteditable=true which are using the redactor plugin.
  • click
    Any clickable element.
  • function
    This is the most powerful of all. This function will be passed jQuery element for the given selector as this for the invocation. This can be used to handle actions which the core api doesn't yet support, like triggering focusout. For e.g.
selector: '.text-drop-down-input:eq(0)',
action: function () {
   this.val('Choice 1').trigger('focusout');
}

###4. value (optional) This attribute together with action is used to specify the value which will be set in element located by the selector.

###5. type (optional, default blank, only one possible value recipe) It is used to inject other recipes at a particular index in the steps to be executed. If specified, recipeId should also be specified pointing to the recipe which is to be injected

NOTE - For injected recipes stop is never called.

###6. recipeId (optional, required if type=recipe is used) It is used together with type attribute to inject other recipes at a particular index in the steps.

Clone this wiki locally