Typing Enter/Return key in Selenium

0
0

I’m looking for a quick way to type and Enter or Return key in Selenium. Unfortunately the form I’m trying to test (not my own code so I can’t modify) doesn’t have a Submit button. When working with it manually, I just type ENTER or RETURN. I need to know how to do that with the Selenium type command as there is no button to click.

  • You must to post comments
0
0
import org.openqa.selenium.Keys
WebElement.sendKeys(Keys.RETURN);


the import statement is for Java, for other languages it is maybe a different, for example python: from selenium.webdriver.common.keys import Keys

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website