Javascript 父/子:提交()或单击()?

Javascript 父/子:提交()或单击()?,javascript,selenium,Javascript,Selenium,几天来,我一直在努力寻找以下场景的解决方案,希望有人能在这方面提供一些帮助。让我解释一下,如果我手动操作,在父页面上,填写一些信息后,单击“继续”按钮 <FORM NAME='user' ACTION="userConf.jsp" METHOD='post'> <FIELDSET><LEGEND>Enter User Information</LEGEND> <INPUT TYPE='button' VALUE='Contin

几天来,我一直在努力寻找以下场景的解决方案,希望有人能在这方面提供一些帮助。让我解释一下,如果我手动操作,在父页面上,填写一些信息后,单击“继续”按钮

<FORM NAME='user' ACTION="userConf.jsp" METHOD='post'>
    <FIELDSET><LEGEND>Enter User Information</LEGEND>

   <INPUT TYPE='button' VALUE='Continue' onClick='sendForm()'>
到目前为止,一切都不起作用。如果有人能告诉我如何使用Selenium驱动程序和Java模拟手动点击,我将不胜感激


提前多谢

在HTML中找到sendForm的源代码,并在此处发布详细信息。这可能与sendForm函数的编写方式有关@Tarun的可能重复项,下面是代码:function.sendForm(){if(checkFields()){openConfirm();document.user.target=“userConfirm”;document.user.submit();函数openConfirm(){win2=window.open(“,”userConfirm“,“toolbar,width=430,height=445,scrollbars=yes,resizeable=yes”);}}}有人能帮我吗?提前多谢!在HTML中找到sendForm的源代码,并在此处发布详细信息。这可能与sendForm函数的编写方式有关@Tarun的可能重复项,下面是代码:function.sendForm(){if(checkFields()){openConfirm();document.user.target=“userConfirm”;document.user.submit();函数openConfirm(){win2=window.open(“,”userConfirm“,“toolbar,width=430,height=445,scrollbars=yes,resizeable=yes”);}}}有人能帮我吗?提前多谢!
 <FORM NAME='userConf' ACTION='user.jsp' METHOD='post'> 
    Do you want to continue?<BR>
    <INPUT TYPE='button' VALUE='Continue' onClick='createUser()'> 
  </FORM>
JavascriptExecutor jse = (JavascriptExecutor) driver;
jse.executeScript("arguments[0].click();",btnContinue);
  or 
new Actions(driver).moveToElement(driver.findElement(By.xpath("//input [@value='Continue']"))).click().perform();