C# wait for page loading

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Irwing
    New Member
    • Jan 2012
    • 1

    C# wait for page loading

    Hi,

    pls can somebody help me with this problem?
    Im trying to start a process in iexplore window from console and need to wait till the page is loaded and if done I need to close the window, but I dont know how. Can you help me?

    Here´s the part of the code:
    try
    {
    Process OpenPage = new Process();
    OpenPage.StartI nfo.FileName = "iexplore.e xe";
    OpenPage.StartI nfo.Arguments = target;
    OpenPage.Start( );
    OpenPage.WaitFo rInputIdle();
    OpenPage.Kill() ;
    }

    Thank you
  • Fr33dan
    New Member
    • Oct 2008
    • 57

    #2
    Maybe someone can correct me but I do not know of anyway to communicate with a process launched with the Process class. You could however use the WebBrowser class to load the page within your program and use the DocumentComplet ed event to do what you need to after the page is loaded.

    Comment

    Working...