Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between return and enter keys in Selenium

What is the difference between return and enter keys in Selenium? This related SO answer and the provided link state that they are different. I also noticed that enter key will send an HTML form while return doesn't when using Firefox 24.2.

like image 741
razz0 Avatar asked Jan 27 '14 09:01

razz0


1 Answers

Normally these keys are interchangeable. I believe the original implementation the Keys. Enter was the enter key on the number pad and the Keys.

Return was the one next to the letters. It's also fine to use these keys in Selenium testing, if it matches a user flow or requirement, which is the goal of testing through the UI.

enter image description here

like image 174
Willcurles Avatar answered Oct 31 '22 15:10

Willcurles