Reputation: 85845
I have to convert a manual build process to an automated build process. I am going through the process and have identified a couple areas that I am sure how to approach.
I am new to powershell so I can't really say off the bat if something can be done or not.
I have this vb6 form that pops up. It has a couple tabs and some dropdown lists, text fields and buttons.
A user would manually choose a choice from the dropdown list and fill in certain text fields and then hit a button to save.
Is it possible to still have this application run with the dialog appearing and then somehow have powershell fill out the required fields and then do a save?
I am sort of thinking maybe something like how in jquery for instance you could select fields by ids and then fill values into them.
If this is not possible would the application need to be modified to accept arguments in and then it would use it populate the values?
Or do I have to extract the code out that does it and somehow convert it(something I do not really want to do as I really don't understand fully how the application works) to powershell?
Upvotes: 0
Views: 3149
Reputation: 4866
You have 2 choices -
Automate your VB6 UI using Powershell like this - http://msdn.microsoft.com/en-us/magazine/cc163301.aspx
Rewrite everything using Powershell including the GUI - http://blogs.technet.com/b/csps/archive/2011/12/07/guiapp.aspx
[UPDATE on Link 1]:
I downloaded the code provided in MSDN and ran it. It just works ! Here I will explain -
Make this change in the Microsoft*.ps1 script - i.e. the prper path to the DLL
sl 'F:\Angshuman\Code\PowershellUIAutomation\TestRun\CustomUICmdletsLib\bin\Debug'
set-location F:\Angshuman\Code\PowershellUIAutomation\TestRun
and execute it
invoke-item
'F:\Angshuman\Code\PowershellUIAutomation\TestRun\TheAppToTest\bin\Debug\TheAppToTest.exe'
Now execute the script. You will be prompted with a UI with full automation is display.
Hope this helps and you should be now able to achieve the same with your VB6 UI
Upvotes: 1