Created
          March 18, 2015 13:25 
        
      - 
      
- 
        Save artjomb/5e6f12b525789d81856c to your computer and use it in GitHub Desktop. 
    keyPressLeft.js
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var casper = require('casper').create(); | |
| casper.start("http://stackoverflow.com/contact", function(){ | |
| this.capture("test37_1.png"); // "" | |
| this.sendKeys("#search > input", "abcd", {keepFocus: true}); | |
| this.capture("test37_2.png"); // "abcd" | |
| this.page.sendEvent("keypress", casper.page.event.key.Left); | |
| this.page.sendEvent("keypress", casper.page.event.key.Left); | |
| this.sendKeys("#search > input", "12"); | |
| this.capture("test37_3.png"); // "ab12cd" | |
| }).run(); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment