VB.net中奇怪的Web浏览器控制问题 [英] Weird Web browser control problem in VB.net

查看:173
本文介绍了VB.net中奇怪的Web浏览器控制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个Web抓取应用程序.
该应用程序打开一个链接,复制数据,然后单击(模拟单击)页面上的下一步"按钮(转到第二页),然后再次循环以复制数据.
该应用程序在首页上运行良好.单击下一步按钮,但复制首页数据.
当我在程序中放置一个消息框以使其在从第二页复制数据之前显示消息框时,一切正常.

这些步骤使应用程序可以正常工作.
1)转到url
2)复制数据(我已使用HTML敏捷包来解析网页)
3)点击下一步
4)显示消息框
5)从第二页复制数据.

当我删除第4步时,就会出现问题.

I''m building an web scraping application.
The application opens a link,copies data and click(simulate click) "next" button on the page(goes to second page) and loop again to copy data.
The application works fine for first page. It click next button but copies data of first page.
When I put a messagebox in program such that it display messagebox before copying data from second page everything works fine.

These steps make applcation works fine.
1)Go to url
2)copy data (I''ve used HTML agility pack to parse web page)
3)click next
4)display messagebox
5)copy data from second page.

When I remove 4th step the problem occurs. What could be the problem.

推荐答案

由于您没有发布单击下一步"并读取数据的代码,因此只能猜测.

但是,听起来好像您是单击下一步",而不是等待新页面完成加载,因此,您仍在查看前一页数据.
Since you didn''t post your code that is clicking Next and reading the data, we can only guess.

But, it sounds as if you''re clicking Next, but not waiting for the new page to finish loading, thereby, you''re still looking at the previous page data.


这篇关于VB.net中奇怪的Web浏览器控制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆