HTML code:
<button id="welcomeContinue" class="btn btn-primary padlock active-removal" type="submit">
<span class="icon-padlock"></span>
CONTINUE
</button>
<input class="btn btn-primary padlock disabled" type="hidden" value="" title="Continue" name="continueanonymousSubmit" alt="Continue">
<input type="hidden" value=" " name="_D:continueanonymousSubmit">
代码:
driver.findElement(By.id("welcomeContinue")).click();
如何选择提交按钮并进入下一页
答案 0 :(得分:0)
submit()
方法,而不是点击。 答案 1 :(得分:0)
driver.findElement(By.xpath("//button[@type='submit']")).click()