Redian新闻
>
自动化的问题 (WebBrowser)
avatar
自动化的问题 (WebBrowser)# DotNet - 窗口里的风景
s*i
1
在.NET2.0下,VS2005 (or Beta)用WebBrowser control.
要做如下事情:
1。访问www.insidercow.com
2。在网页的textbox里填上 IBM
3。“点击”search,进入IBM的insider trading 网页(最终目的)
怎么做2和3呢? 当然用IE control是可以的。
avatar
j*o
2
For 2 and 3, why not submit to the form handler directly?
webBrowser1.Navigate("http://www.insidercow.com/history/company.jsp?company=IBM"
However, you may do #2 like the following.
... Navigate...
webBrowser1.Navigate("http://www.insidercow.com/insidercow.jsp");
... DocumentCompleted ...
HtmlDocument fDoc;
fDoc = webBrowser1.Document;
fDoc.Forms[1].All[5].InnerText = "IBM";
I haven't found the way to submit the form yet.

【在 s*i 的大作中提到】
: 在.NET2.0下,VS2005 (or Beta)用WebBrowser control.
: 要做如下事情:
: 1。访问www.insidercow.com
: 2。在网页的textbox里填上 IBM
: 3。“点击”search,进入IBM的insider trading 网页(最终目的)
: 怎么做2和3呢? 当然用IE control是可以的。

avatar
s*i
3
Thanks. Your solution works.
I doubt there is a way to simulate "click" in the new model.

【在 j*****o 的大作中提到】
: For 2 and 3, why not submit to the form handler directly?
: webBrowser1.Navigate("http://www.insidercow.com/history/company.jsp?company=IBM"
: However, you may do #2 like the following.
: ... Navigate...
: webBrowser1.Navigate("http://www.insidercow.com/insidercow.jsp");
: ... DocumentCompleted ...
: HtmlDocument fDoc;
: fDoc = webBrowser1.Document;
: fDoc.Forms[1].All[5].InnerText = "IBM";
: I haven't found the way to submit the form yet.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。