What is the best practice to simulate an ENTER or RETURN using Selenium WebDriver
I came across this solution to my initial problem, which was to simulate an ENTER or RETURN key press using Selenium WebDriver. However, in my code, I strictly want to use only one of the two WebElement.sendKeys(Keys.ENTER); vs WebElement.sendKeys(Keys.RETURN); . What is the best practice when doing the same, since there seems to be divided opinion about using enter or return, since both work MOST of the time? In what scenarios would one or the other not work, and is there one which would ALWAYS work? As a performancewise I do not get any change on both of these, But yes I know one difference