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

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

Replies are listed 'Best First'.
Re^6: How To Simulate "Enter" Key Stroke using WWW::Selenium
by venkatesan_G02 (Sexton) on Nov 13, 2009 at 20:51 UTC
    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.
        hmm should be clearer to write '\13' to avoid "escape confusion"...

        Cheers Rolf