I'm trying to simualte keyboard events in webpage through javascript since Actions is not supported in safari browser.
To Start with I created a simple form (given below) and trying to tab through the text boxes but it didn't work.
Java script used: (ubuntu and chrome browser). I fired the script in the chrome browser console.
var pressTabKey = document.createEvent("KeyboardEvent");
pressTabKey.initKeyboardEvent("keypress", true, true, null, false, false, false, false, 9, 0);
document.getElementById('1234').focus();
document.getElementById('1234').dispatchEvent(pressTabKey);
HTML Form:
   <html>      
   <head>         
   </head>   
   <body>
        <p>Test Page </p>      
        <form>
        <input  id="1234" type="text" value="Enter Here"> 
        <br>
        <br>
        <input  id="1235" type="text" value="Enter Here">           
        </form>  
  </body>   
  </html>
 
     
     
     
    