My goal is building an automatic installation process for selenium automation with Excel VBA on the customers PC so the user does not have to be an IT expert, but just press a button that runs VBA code.
The customer needs selenium code that runs my program but if he does not have Selenium already installed he will get a broken reference MISSING that cannot be handled by code after the error accrues (Only manually).
I tried a workaround by unloading the reference from the file before sending to the customer and loading it again after selenium is installed but this does not work because the file will not compile to EXE or DLL file without the selenium reference. If the reference is not unloaded before sending to the customer it will say MISSING and no automatic installation will be possible.
The only way around I came up with is having 2 separate files, One with just the automatic installation process with no selenium code or reference library so it can be compiled and a second file with the selenium code and reference library that will only work after the installation is complete successfully.
Is this the right way to go or do you have a better suggestion?