0
<form name="login" action="security_check" method='POST'>
<input data-qa="login.username" type="text" class="text-box text-box--fluid" placeholder="Username" autofocus=true name='username'/>
<input data-qa="login.password" type="password" class="text-box text-box--fluid" placeholder="Password" name='password'/>
<button data-qa="login.submit" type="submit" class="btn btn--primary btn--large" onclick="submit_onclick(this)">Log In</button>
</form>
버튼을 양식에 제출하고 싶습니다. 제출에 이름 또는 ID가 없습니다.이름이나 값없이 버튼을 제출하는 방법 [업데이트 됨]
final HtmlForm form = resultPage.getFirstByXPath("//form[@action='security_check']");
final HtmlTextInput textField = form.getInputByName("username");
final HtmlPasswordInput pwd = form.getInputByName("password");
textField.setValueAttribute("username");
pwd.setValueAttribute("password-2016");
버튼을 가져 와서 양식을 제출하는 방법입니다.