| || |
Application Configuration question?
So I have a script which is testing a Unix screen through a putty console. (The point being it doesn't use IE)
We will call this the Main Script.
The Main Script calls a sub function that goes out and looks for the data I need in the Database. This data script is in a seperate file and a seprate module. If the data isn't there I then open up IE and go through our web program and create the data and pass that data back to the main script.
We will call this the data script.
So the Data script obviously has a Application Configuration for IE.
But it seems like my Main script which does not do anything (Directly) with IE also needs an application configuration for IE?
Its more confusing because I get an error that an Application Configuration is not present, but when I click debug it opens me up in the Data Script which has the correct Application Configuration.
Is this a bug or how it was designed? Its almost like the Application Configuration gets passed down to the sub script?
I don't know if this is related to the other bug with Application Configuration and IE?
Last edited by tubaloth; 04-12-2013 at 07:19 AM.
This sounds like something that you'd want Borland/Micro Focus to help you with.
This is what support told me.
Our Developers have now confirmed that by design; the SilkTest Workbench Scripts currently ignore Application Configurations defined in referenced scripts.
This behaviour could be modified to execute any App Configurations set in referenced scripts; but as ever there are potential consequences regarding how this may work in practice.
One possible approach would be to set all Application Configurations for the main, and all referenced scripts; recurrsively at the start of playback. However this could then result in multiple applications starting simulataneously, if there are many referenced scripts that all have at least one App Configuration. Some of these may not even be necessary, if the code that interacts with a particular application is never executed.
Another possibility would be to set AppConfigs for a referenced script the first time it is called. While it is possible for Development to adopt this approach, it would take quite a bit of work to implement it.
If you would like the Workbench to work this way; we can submit an enhancement request; for it to honor AppConfigs set in referenced scripts. Another possible enhancement would be for the Workbench to somehow provide programmatic access to the AppConfigs of the current script. This could then allow the user to get the AppConfigs and hook them if/when it makes sense to do so.
1. Continue to employ the workaround that you are already using; which involves adding an AppConfig for IE in the original script.
2. Within the referenced .Net script; create a new instance of the BrowserBaseState class (passing it the necessary information in the constructor, which is the same as in the Edit Application Configuration Dialog), and then call BrowserBaseState.Execute(). Note that this will both hook and start IE.
3. Call Agent.Attach(), passing it the necessary information to attach/hook to IE. But please note that IE will not be automatically started in this case.
Please let me know if you have any further questions; or if you would like me to submit a Feature Request on your behalf.