This project is read-only.

Error Initializing Form Exception

Jan 8, 2010 at 2:06 PM

Hi Guys,

     I try to use the white to do the windows automation, the following codes do click the button and show a new form:

    app = Application.Attach("xxxx");
    window = app.GetWindow("xxxx");

     When after the above codes, it should show a new form. But I get the exceptions message box:

     Title: Error Initializing Form
     Details: The following error has occured: Object reference not set to an instance of an object.

     In addition, it is ok in my computer when run the above codes but errors in many other computers, and it is also ok when click it in other computers manually.

     So I'm not sure what happened, please advice if you have any suggestions, thanks.

Jan 17, 2010 at 5:51 AM

are you not getting the button or the window? Also have you gone through the list of common question [Other questions]

Jan 18, 2010 at 2:48 AM

Hi viveksingh,

    Thanks for your reply.

    For the following codes like

    app = Application.Attach("xxxx");
    window = app.GetWindow("xxxx");

    I can get the window and the button, and the window and button is not null.  In addition, when I debug in the other computers, sometimes works and sometimes not(Get the exception like Object reference not set to an instance of an object).

    Then I use the key "Error Initializing Form" to search in google and all white source code, but didn't get more informations. Is it in the code of white base source? 

     Please advice.

Jan 18, 2010 at 5:06 AM

can you please send the complete stack trace and attach the test project?

Jan 28, 2010 at 3:56 AM

No stack trace when we click the button via white. Is the error caused by Win 32 API?