In my current case, I'm using clones to select an item in a combobox.
For context: I'm working with a SAP web application. When I interrogate the combobox control, the control turns into a textbox (OpenSpan.Adapters.Web.HtmlInputTextElement). This textbox object doesn't have the "SelectItem" method. So that's why I'm trying to use a workaround. First, I click the combobox so the menu-items will appear, then I'll click the desired item.
In the flow, I get all the (list)items from the combobox, using GetClones. After that, I use the String.Equals method to find the right clone for my case. This is the clone I want to click on. This all works well (see the image for the current flow).
The problem for me is that I have to do this action atleast five times. So I want to make a generic automation for clicking the right clone.
So my question is: how can I successfully pass an object (that is a clone collection) to an automation?
In this automation, I want to list loop through all the clones to find the right one and click it.
@RobinT51 I don't think you can really pass the object that you call GetClones on, however you can call GetClones and pass the collection in. That type is "OpenSpan.Design.CloneCollection" (in 19.1 at least). You can browser to this type when setting up an entry point parameter.
Good to know we are able to pass a CloneCollection as a parameter. That can be convenient when searching a certain clone.
In my case, I did need a reference to the object. So I ended up making a copy of my automation (Add Project items, add existing automation, generate new ID). In the newly created automation I replaced the clone object with the new clone object. This was a fast method to get the job done. This way I created a bit of recurrence, but it's acceptable.