On the page I want to test I have a form like this:
<form method="post" action="target.html">
<input id="myInputField" />
</form>
A normal use-case here would be that the user enters some text and then hits enter. For testing I tried sending the Special-Key "enter" but that results in an exception:
org.openqa.selenium.WebDriverException: Cannot locate element used to submit form
Is there a way to submit a form without having a button present? I am testing headless with HtmlUnitDriver.