Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 26-Oct-11 22:04pm
v2
Comments
DaveAuld 27-Oct-11 5:39am    
update your question with the relevant code you are currently using.

1 solution

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.
 
Share this answer
 
Comments
Scubapro 27-Oct-11 10:08am    
I agree with Dave. Maybe you should look into the WebBrowserDocumentCompletedEventHandler?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900