# Dynamic Selector Missing UI Element

**URL:** <https://forum.uipath.com/t/dynamic-selector-missing-ui-element/267348>\
**Category:** Help\
**Tags:** question, activities, excel, uiautomation\
**Created:** [November 6, 2020, 4:03am UTC](https://forum.uipath.com/t/dynamic-selector-missing-ui-element/267348 "2020-11-06T04:03:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aldrin\_Pro](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aldrin_pro/32/183579_2.png) [@Aldrin\_Pro](https://forum.uipath.com/u/Aldrin_Pro)\
**Post date:** [November 6, 2020, 4:03am UTC](https://forum.uipath.com/t/dynamic-selector-missing-ui-element/267348/1 "2020-11-06T04:03:47Z")

</div>

Hello guys, my bot was suppose to click on the list given (refer image below) based on excel. Then, the selector will read those excel one-by-one and find those word and click.

Unfortunately, my selector came out error: “Click ‘A [https://mmls.mmu.edu](https://mmls.mmu.edu)…’: Cannot find the UI element corresponding to this selector: ”

 ![Capture](https://global.discourse-cdn.com/uipath/original/3X/7/f/7fbced9889f5312085c1800c71aeee2b36070067.png)

I’m using assign method, make variable and transfer those input from excel to variable but it can’t read.

 ![selector](https://global.discourse-cdn.com/uipath/original/3X/8/4/84f3abf580538d41b6b8a47b8e79ee6eb6018c54.png)

---

<div class="post-metadata">

**Author:** ![RPAForEveryone](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rpaforeveryone/32/447393_2.png) [@RPAForEveryone](https://forum.uipath.com/u/RPAForEveryone)\
**Post date:** [November 6, 2020, 5:20am UTC](https://forum.uipath.com/t/dynamic-selector-missing-ui-element/267348/2 "2020-11-06T05:20:53Z")

</div>

Can you share an example of how you’re building the `selector` variable using Assign?

Also, as a general tip, you can make your selector dynamic without building a string externally and pass as seletor.  
Just insert the variables in your workflow using following syntax:  
`{{variableName}}`

e.g. `< tag='INPUT' type='button' aaname='{{textfieldVariable}}'`  
This selector will match a button having aaname attribute set to the variable value.

I hope this helps.

---

<div class="post-metadata">

**Author:** ![Aldrin\_Pro](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aldrin_pro/32/183579_2.png) [@Aldrin\_Pro](https://forum.uipath.com/u/Aldrin_Pro)\
**Post date:** [November 6, 2020, 5:59am UTC](https://forum.uipath.com/t/dynamic-selector-missing-ui-element/267348/3 "2020-11-06T05:59:10Z")

</div>

Sorry a bit confusing the one you mentioning. For the example, I refer exactly from this video except that, mine read from excel instead of “Input Dialog” (credit: KB Tutorial) [Dynamic Selectors In UiPath Rpa Part-1 - YouTube](https://www.youtube.com/watch?v=YSwb-oOio8E&t=280s)

---

<div class="post-metadata">

**Author:** ![RPAForEveryone](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rpaforeveryone/32/447393_2.png) [@RPAForEveryone](https://forum.uipath.com/u/RPAForEveryone)\
**Post date:** [November 6, 2020, 6:35am UTC](https://forum.uipath.com/t/dynamic-selector-missing-ui-element/267348/4 "2020-11-06T06:35:54Z")

</div>

As you see from the date on the video, it’s nearly 18 months old.  
UiPath activities as usual have evolved significantly over that time 🙂  
You no longer have to use something `"aaname='" & name & "' ..."`  
You can instead use the syntax I mentioned above.  
Think of ` & name &` as `{{name}}` but you also don’t need to `assign` a string variable.

Specific to your example and using video to demonstrate:

![selector](https://global.discourse-cdn.com/uipath/original/3X/8/4/84f3abf580538d41b6b8a47b8e79ee6eb6018c54.png)  
In this image you have uploaded, the Assign activity build a String object `selector` which you must be passing in as an input argument to the Click activity, in `Selector` property.  
Instead, if you click on the menu button (3 horizontal bars) on Click activity, and choose **Edit Selector** , it gives you a more advanced editor as seen below:

 ![image](https://global.discourse-cdn.com/uipath/original/3X/f/f/ff8d5202b403c7419e42dafa0fa22d3d478b6a1c.png)

Here you can edit the value `'30'` to match an incoming variable as shown in the video.  
Use `<ctrl name='{{name}}' role='cell' />`

The benefit here is that you can validate the selector and indicate element if needed. Then you just need to insert your variable wherever needed.  
With the `selector` variable passed as a string, the ‘Edit Selector’ window isn’t as well-structured as shown above. It’s easier to manage this way.

I hope this helps explain the feature and how you can best utilize it.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [November 11, 2020, 9:04am UTC](https://forum.uipath.com/t/dynamic-selector-missing-ui-element/267348/5 "2020-11-11T09:04:47Z")

</div>

Closed on November 11, 2020, 9:04am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
