Edit in JSFiddle

//This script uses the Dojo query with css3 selector to find the element by the target specified
//The script uses a JSON array with actions. 
var steps = [
             
             {action:"input", target:"#input1", text:"This will be typed"}
             
            ];

var curIndex = 0;
var cLetter = 0;
    
var tText = "";
var tTarget;

function typeLetter(){
  	  
  	  require(["dojo/query!css3"],
		        function(query){
 		 		   	var input = dojo.query(tTarget, document)[0];
		 		    var s = input.value;
		 		   	input.value = s + tText.charAt(0);
		 		   	
				    tText = tText.substring(1);
				 
				 	  if (tText.length > 0){
            				//Use a random time from 20-200ms between characters
				      			var time = Math.round((Math.random() * (200 - 20) + 20));
				      			window.setTimeout(function(){typeLetter()}, time);
				      }else{
				       		curIndex++;
				
						 			setTimeout(function(){ playSteps(); }, 0);
				
					  }
 		 		   });

}


function inputText(target, text){
  tTarget = target;
	tText = text;
  typeLetter();
}


function playSteps(){

  if (curIndex >= steps.length) return;
  
	var target = steps[curIndex].target;
  var action = steps[curIndex].action;
  var text   = steps[curIndex].text;
  

  if (action == "input" && text){
		inputText(target, text);
  }
}

playSteps();

<input id="input1" class="my_input" name="input1"></input>
.panel{
  height:100px;
  width:100px;
  background-color: lightgrey;
  border-right: solid 1px darkgrey;
  border-bottom: solid 1px darkgrey;
  padding:5px;
}
.cursor{
  position:absolute;
  height:48px;
  width:48px;
  top: 45%;
  left:45%;
  cursor: pointer;
  background-image: url('https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/48/cursor.png');
  background-size:cover;
}
.hide{
  display:none;
}