i am currently working on a windows app which shall visit a webpage and do some tasks on it. which tasks it shall do says a little txt-file. in each line of the txt-file there is a name of a method and some parameters. so my app is going through the file and executes the methods. for example a method is "goto>>URL". when my app reads this line it navigates with the build in WebBrowser to the URL. And here comes the problem: the goto-command takes very long. but while the navigation is executed, my app goes on and exectutes the next command, for which it is important that the webbrowser has loaded the new document.
i tried it whit a boolean named loading which i set "true" when the navigation begins and "false" when the document is loaded. i wanted something like
while (loading) {donothing()} NextCommand().... but i cannot use thread.sleep() because it not only freezes the donothing() method but also the loading of the document...
anyone who has a solution?
thank you in advance
and sorry for my bad english, it is not my native language...