How would you automate selecting categories as the web recorder fails to pick this up when recording? This is for a video CMS we are using in our company and we need to bulk process numerous videos and would like to use PAD to automate this process.
<div class="col-lg-4" winautomationvisibilitylandmark="true">
<div class="form-group" winautomationvisibilitylandmark="true">
<label winautomationvisibilitylandmark="true">Categories</label>
<div class="select2-container select2-container-multi form-control ng-untouched ng-valid ng-not-empty ng-dirty ng-valid-parse" id="s2id_autogen11" winautomationvisibilitylandmark="true"><ul class="select2-choices" winautomationvisibilitylandmark="true"> <li class="select2-search-choice" winautomationvisibilitylandmark="true"> <div winautomationvisibilitylandmark="true">Cat 1
</div> <a href="http://backend/#" class="select2-search-choice-close" tabindex="-1" winautomationvisibilitylandmark="true"></a></li><li class="select2-search-field" winautomationvisibilitylandmark="true"> <label for="s2id_autogen12" class="select2-offscreen" winautomationvisibilitylandmark="true"></label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" id="s2id_autogen12" placeholder="" style="width: 20px;" winautomationvisibilitylandmark="true" winautomationtextboxvalue="" aria-activedescendant="select2-result-label-84"> </li></ul></div><select ui-select2="select2Options" data-placeholder="Select Categories" multiple="" class="form-control ng-untouched ng-valid select2-offscreen ng-not-empty ng-dirty ng-valid-parse" ng-model="video.categories" tabindex="-1" winautomationvisibilitylandmark="true" style="">
<!-- ngRepeat: item in categories --><option ng-repeat="item in categories" value="5d3c98aac7e40d7141076d61" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 1
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c18dd08d1ac5f26a81722" class="ng-binding ng-scope" winautomationvisibilitylandmark="true">Cat 2
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5e8c797473f21d0a528da1db" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 3
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5f20884573f21d0a528da854" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 4
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5cdc7748ef12b22961cadb09" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 5
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c191f08d1ac5f26a81728" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 6
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c192c08d1ac5f26a81729" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 7
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5f20885c73f21d0a528da855" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 8
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c188b08d1ac5f26a81720" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 9
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c18e708d1ac5f26a81723" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 10
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5d3c988dc7e40d7141076d60" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 11
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c190e08d1ac5f26a81726" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 12
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5ce58e61ef12b22961cade9c" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 13
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c18ca08d1ac5f26a81721" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 14
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c18f708d1ac5f26a81724" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 15
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5cb9fd8672363710418692a5" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 16
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5cdc775cef12b22961cadb0a" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 17
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5f20882673f21d0a528da853" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 18
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c18ff08d1ac5f26a81725" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 19
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c193508d1ac5f26a8172a" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 20
</option><!-- end ngRepeat: item in categories --><option ng-repeat="item in categories" value="5c7c191808d1ac5f26a81727" class="ng-binding ng-scope" winautomationvisibilitylandmark="false">Cat 21
</option><!-- end ngRepeat: item in categories -->
</select>
</div>
Thank you for any suggestions or advice.
Try this action as it looks like a select field with multiple options: https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/webautomation#setdro...
Thanks but still not working. Ugh
What is not working? Error message?
Looks like it cannot locate the field to populate, I receive this error:
Robin.Core.ActionException: Failed to write text 'Select' in form field. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Robin.Modules.WebAutomation.Actions.WebpageTextFieldPopulator.HandlePopulateTextResult(WebAutomationResult result)
at Robin.Modules.WebAutomation.Actions.WebpageTextFieldPopulator.WebExtensionsBrowserRun()
--- End of inner exception stack trace ---
at Robin.Modules.WebAutomation.Actions.PopulateTextFieldBase.Execute(ActionContext context)
at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)
Looks like you chose the wrong action, must be "Set drop-down list value on web page"
Seems nothing will work I have tried all possible options. Looks like I need to focus on the text, then input text to search then somehow get the right option selected. I guess maybe because this is an angular-based app running on the webserver and there is no way to automate data entry using PAD. Thanks, I will just give up.
Tried your code in https://www.onlinehtmleditor.net/ and it works fine.
WebAutomation.AttachToChromeByTitle TabTitle: $'''Online HTML Editor: Real time online with preview''' BrowserInstance=> Browser
Variables.CreateNewList List=> List
Variables.AddItemToList Item: $'''Cat 1''' List: List NewList=> List
Variables.AddItemToList Item: $'''Cat 3''' List: List NewList=> List
WebAutomation.FormFilling.SetDropDownListValueByName BrowserInstance: Browser Control: appmask['Web Page \'https://www.onlinehtmleditor.net/\'']['<select> \'f ... ng-valid-parse\''] OptionNames: List
For the UI element you need to select the <select> element
Thanks but how do I manually get it to obtain the <select> UI element, do manually code it in?
You just hover over an element and right click to select the parent element or CTRL + mouse wheel
That's the problem it's not picking up the correct element.
I'm running into the same issue. I'm not totally sure, but I think the value winautomationtextboxvalue may be the culprit. Whoever owns this seems to be blocking grabbing the link programmatically. Totally not sure on that. It's just a hunch, based on the name of the attribute and the troubles I'm having