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

Enter produces a newline, not a carriage return. I'm not saying selenium will accept a newline — I don't know the first thing about selenium — I'm saying that sending a carriage return is surely incorrect.
  • Comment on Re^3: How To Simulate "Enter" Key Stroke using WWW::Selenium

Replies are listed 'Best First'.
Re^4: How To Simulate "Enter" Key Stroke using WWW::Selenium
by venkatesan_G02 (Sexton) on Nov 13, 2009 at 20:35 UTC
    So, is there any way to send the enter key press to the application, Please??

      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 !!!