How to enable using a variable as URL placeholder in the Browser URL field in the Descriptor?
The current functionality of Object Repository does not allow the usage of a variables in the Browser URL field of the UI Descriptor.
However, there is a workaround for this and it is valid for either case: whether to use Object Repository in a stand-alone workflow or in a Library project and then import it into a process project.
To use an Object Repository in a Library-type project to be imported and reused in future process-type projects, follow the below:
- Create a new Library-type of project (or process-type, if creating a re-usable Library is not desired)
- In the main sequence, use an "Use application/browser" activity. Indicate the browser to be used.
- Go to the properties panel > Input > Unified Application Target > URL and delete whatever value is present in there.
- In the URL field, create a new variable (use the Ctrl + K shortcut), but do not give it any default value. Leave it as blank.
- Click on the Object Repository icon (it should be grayed out at this point).
- Follow the wizard's instructions and Create a new application, then add the screen (i.e, the output of the Use Application/Browser activity) to this application. If you already have an application, you can add the screen to it (if it befits your workflow).
- The field under Browser URL should be empty, as displayed below:
To import the Library into a process workflow, proceed as follows:
- Again, use an "Use Application/Browser" activity and drop into it the item from the Object Repository
- Post that, in the Browser URL field, the name of the default variable created in the initial Object Repository application will be available, but it will throw a compiler error, since it was not created in this workflow
- Create a variable with the exact same name in the scope of the activity and give it the value of the preferred URL.