in reply to Re^3: How To Simulate "Enter" Key Stroke using WWW::Selenium
in thread (SOLVED)How To Simulate "Enter" Key Stroke using WWW::Selenium

So, is there any way to send the enter key press to the application, Please??
  • Comment on Re^4: How To Simulate "Enter" Key Stroke using WWW::Selenium

Replies are listed 'Best First'.
Re^5: How To Simulate "Enter" Key Stroke using WWW::Selenium
by ikegami (Patriarch) on Nov 13, 2009 at 20:37 UTC

    Did you get the same error sending a newline? There's also a mention of sending a backslash followed by keycode, so I'd also try all of the following:

    $sel->key_press("q", "\12"); # Newline $sel->key_press("q", "\\10"); # Decimal $sel->key_press("q", "\\12"); # Octal $sel->key_press("q", "\15"); # Carriage return $sel->key_press("q", "\\13"); # Decimal $sel->key_press("q", "\\15"); # Octal
      Hey... Thanks it worked this time with
      $sel->key_press("q", "\\13"); # Decimal
      Thanks for your assistance !!!
        String literal "\\13" produces the 3 character string backslash-one-three. 13 must be the keycode for Enter.