I've run into a weird problem. I want to automate an installer. The weird problem is that the installer objects are only recognized when there is an instance already open when the test is run. If I launch the test without the installer already open, I get an object does not exist error.
It's actually not that weird. What it tells me is that your object mapping criteria to determine processes, windows, forms, is not taking into account the possibility of multiple process instances of the installer. IIRC, MSI installer actually spawns multiple processes. It might be that, with the installer already open, you're mapping to the correct process ID just fine because it's present. But, if you're running it as part of the scripts, it may be grabbing the first process that is instantiated rather than waiting for the installer to completely load into memory.
I don't like doing so usually, but after your Run() call, what happens if you do a Delay(60000) and wait a full minute? Does it work properly then? If so, you might want to, instead of just calling your click methods, try using a WaitNNN method to wait for the click button to be present before attempting to interact... Also, look at how you're referencing the process object and make sure you're specific enough to grab the correct process instance.
Automated Testing Evangelists
Definition expert - noun - Unknown drip under pressure