<fieldset><b> </b><button id="submit" class="googleCheckPosButt"
onclick="docSubmit()">CHECK</button></fieldset>
</form>
This is a source code of a webpage where I am trying to put data into a form and submit it. I can successfully enter data into the text fields of the page, but when the web page loads in a web browser it shows a script error and when I click on any of the buttons on the page, nothing works. I have hidden the error messages by adding:
webBrowser1.ScriptErrorsSuppressed = true;
theElementCollection = webBrowser1.Document.GetElementsByTagName("input");
foreach (HtmlElement curElement in theElementCollection)
{
if (curElement.GetAttribute("id").Equals("submit"))
{
curElement.InvokeMember("click");
}
}
Please Help me how can i enter data into the site with out getting script error messages
虽然您可以使用浏览器控件执行这种类型的自动表单提交,但我建议您使用http://htmlagilitypack.codeplex.com之类的内容以及HtmlAgilityPack登录后的示例进行操作。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.